I’ve already created a few projects using sqlite database to fill a listbox. But this time, there is something wrong as I get a NilObjectException when I run the project, and try to fill the LB with data.
This is, like the previous ones, a Xojo Desktop project, with the database on my machine, not on a server
I connect to the database in the app.open event, & that works using this code:
var db as new SQLiteDatabase
db.DatabaseFile = new FolderItem(“HPC Mk 2.db”)
messagebox(“Connected to DB” ) ’ Temporary for checking connection ok
Catch e as DatabaseException
In the LB.open event I use this:
var sqltext as string = “SELECT Composer, Title from Titles inner join Composers on Titles.CompID = Composers.ComposerID ;”
var rs as RowSet = app.db.SelectSQL(sqltext)
The NilObjectException comes on the last line above, & I’m wondering if anyone has an idea as to where I should look, and what I should look for.
I don’t think the problem is with the SQLite query string, as it works when I use it in DB Browser working with the database
Thanks for your help!