I try to save query from SQLLITE to dictionary with following code, but i get error key not found exception, dictionary is also empty.
Using Xojo.Core
Dim d As New Dictionary
Dim dbFile As FolderItem
Dim db As New SQLiteDatabase
dbFile = GetFolderItem("db.sqlite")
db.DatabaseFile = dbFile
//If Not DBConnect Then Return
If db.Connect Then
Dim orders As RecordSet
orders = db.SQLSelect ("SELECT * FROM customers ORDER BY id DESC LIMIT 1")
If db.Error Then
Else
If orders <> Nil Then
While Not orders.EOF
d.Value("id") = orders.Field("id").StringValue
d.Value("customer_business_unit") = orders.Field("customer_business_unit").StringValue
d.Value("date_time") = orders.Field("date_time").StringValue
orders.MoveNext
Wend
End if
End if
End if
msgbox (d.Value("customer_business_unit"))