I have just started using Xojo. I have a SQLite database with tables and I wish to choose the tables names and/or cycle through them using SQLiteDataBase.TableSchema as illustrated in the documentation (such as it is) and i get tables = Nil. Here’s the code
d2 = New OpenDialog
d2.PromptText = " Choose Database "
DBFile = d2.ShowModal
Dim db As SQLiteDatabase
db = New SQLiteDatabase
db.DatabaseFile = DBFile
Dim tables As RecordSet
tables = db.TableSchema
You have to Connect first. (I’ve also included some shorthand in the code below.)
Dim db As new SQLiteDatabase
db.DatabaseFile = DBFile
if not db.Connect() then
// There was some problem
return
end if
Dim tables As RecordSet = db.TableSchema