B4J Question How to set Data

Pelky

Active Member
Licensed User
Longtime User
I have a problem with SetData .... all the rws are shown with log and they are correct
I always get Log("Failed to set data")

Private Sub PopulateTable
DB.InitializeSQLite(DBFileDir, DBFileName, True)
Dim Data As List
Data.Initialize
Data.Clear
Dim Cursor As ResultSet
Cursor = DB.ExecQuery("SELECT Booth, Secure, Bookable FROM Boothname")
Log("After Select")
Do While Cursor.NextRow
Dim Row(3) As Object
Row(0) = Cursor.GetString("Booth")
Row(1) = Cursor.GetString("Secure")
Row(2) = Cursor.GetString("Bookable")

Log(Row(0))
Log(Row(1))
Log(Row(2))
Data.Add(Array(Row))
Loop
Log("after do while loop")
Cursor.Close
Try
B4XTableBoothsRecs.SetData(Data)
Catch
Log("Failed to set data")
End Try
End Sub


Thank you in advance for your time and assistance
 

Pelky

Active Member
Licensed User
Longtime User
If I remove the Try and catch when doing setdata I get the error message:-

Error occurred on line: 705 (B4XTable)
java.sql.SQLException: [SQLITE_ERROR] SQL error or missing database (near ")": syntax error)

thank you
 
Upvote 0
Top