0

I am creating an MS Access database with B4A (was: basic4android) and Jackcess. Every time I try to save a Double value I get the error

JavaLangNumberFormatException invalid double : "null".

How can I update the Access field with a Double value using B4A and Jackcess?

Private Sub ButtonSaveRecordToDataBase_Click

Dim SaveRecord(4) As String

SaveRecord(0) = contact_code
SaveRecord(1) = record_date
SaveRecord(2) = record_quantity
SaveRecord(3) = record_value

RecordsTable.AddRow(SaveRecord)

End Sub
Gord Thompson
  • 116,920
  • 32
  • 215
  • 418

1 Answers1

0

Your SaveRecord array is declared As String. One of the elements (record_value, I presume) contains the string "null" and Jackcess won't accept that as a Double value. You may need to declare your SaveRecord array As Variant As Object so it can contain true Null values.

Gord Thompson
  • 116,920
  • 32
  • 215
  • 418
  • I convert the string value to double before i use it and the problem continues. Basic4android has no variant data type – redSparrow Apr 23 '16 at 16:58