Ask Your Question
0

java.lang.NumberFormatException in Base form

asked 2016-06-01 07:11:13 +0200

Alb58 gravatar image

I made a form in Base that has a subform which requires input of a date field and a number. I defined the fields for the subform table as a [DATE] field and as a [NUMERIC] field. I can add data directly to the table and it is displayed OK in the form but when I try to save a new record in the form I get this error message "java.lang.NumberFormatException" It must have something to do with the numeric fields. It must be simple to fix, but I haven't found a solution yet. Any help appreciated!

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2016-06-01 17:02:32 +0200

Ratslinger gravatar image

There are many ways to generate that error. Your question does not explain what controls are being used on the form to input the data. For example, if the table field is numeric and the form is a TextBox and you enter a date, the error will occur. Likewise, if the table field is numeric and the form is a TextBox and you enter "a1" you will get the same error. You can set a table field as a number, format the column as Date, have it display correctly in a TextBox and when you try to enter a different date for that field on the form it will generate the error.

Without further information on your exact setup, look that your form input fields are in sync with the actual table field definitions.

edit flag offensive delete link more

Comments

Hi Ratslinger, thank you for your answer, that gave me a clue where to look and I used it to narrow down the error area and to fix the field definition in the table. I selectively left some field blanks to find out which one caused the error. It was a [NUMERIC] field that was causing the problem. I replaced with a [REAL] number in the table and that did it! Don't know what the difference is between these well enough to tell which one will work or not but replacing the type of number handled.

Alb58 gravatar imageAlb58 ( 2016-06-02 17:22:40 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2016-06-01 07:11:13 +0200

Seen: 486 times

Last updated: Jun 01 '16