[Gambas-user] sqlite3 component can't seem to handle very large numbers

Herman Borsje hebodev at ...626...
Sat Jun 17 00:44:28 CEST 2017


When I retrieve a result from a sqlite3 database which holds very large 
numbers in some fields, I get weird results. Up to 10 digits works okay, 
but larger numbers are incorrect. Any ideas as to what's going wrong?

I am using Gambas 3.9.2 on Linux Mint 18.1

Tabledef: id INTEGER, name TEXT;

Database records:

id                         name

1234567890        test1

12345678901      test2

123456789010    test3


Public Sub Button1_Click()

   Dim rs As Result
   Dim con As New Connection
   con.Name = "test.db"
   con.Type = "sqlite3"
   con.Open

   rs = con.Exec("select * from test")

   For Each rs
     Debug Cstr(rs!id) & ": " & rs!name
   Next

   con.Close

End

Debug results:

FMain.Button1_Click.14: 1234567890: test1
FMain.Button1_Click.14: 0: test2
FMain.Button1_Click.14: 6714656: test3





More information about the User mailing list