Does the latest Public XOJO have issues with SQLite databases ? as so far it seems that i get random results on this and it drives me nuts.
I have this code
Var rows As RowSet
Try
rows = configDB.SelectSQL("SELECT * FROM settings")
If rows <> Nil Then
If rows.AfterLastRow Then
Return False
Else
For Each row As DatabaseRow In rows
In XOJO i get
If rows.AfterLastRow Then
Return False
But in the database i have 4 records for that , can someone explain this ?
it was just for debug purposes as i know i have 4 records but apparently it shows me like it has no records for that table, that will disappear from there , the purpose of that is to make sure that the rows is not empty , but apparently it is.
I looked into Beatrix cause as well, i changed the column names from name & value to pname and pvalue just for test and i get same result, so something does not work there.
Create an entire test case that people can run and see. Probably doing so you can find the issue by yourself, if not we will see the same problem you see.
Var db As New SQLiteDatabase
db.Connect
db.ExecuteSQL("CREATE TABLE settings (id INTEGER PRIMARY KEY, my_set TEXT);")
db.ExecuteSQL("INSERT INTO settings (my_set) VALUES ('aaa');")
db.ExecuteSQL("INSERT INTO settings (my_set) VALUES ('bbb');")
db.ExecuteSQL("INSERT INTO settings (my_set) VALUES ('ccc');")
Var rs As RowSet = db.SelectSQL("SELECT * FROM settings;")
Var isEOF As String = If(rs.AfterLastRow, "EOF", "Good to go!")
Break
Apparently i had one more test code old one, that was creating the db in different location and it was writing in the good one but reading from the bad one which was empty.