(Running latest Xojo under Linux, using SQLite3)
I’ve read a few threads here in the forums, but none seemed to help.
I have some global_properties setup and I’ll post the ones I think are relevant to my question…
mDB
IsConnected
When my app first pops up, in the “open” event handler for the app, I open the database and read in some defaults, leaving the db open as seen here:
[code] Dim dbFile As New FolderItem("/home/themagicm/.portflowanalyzer/portflowdb.sqlite")
mDb = New SQLiteDatabase
mDb.DatabaseFile = dbFile
[/code]
In my main window, I have a button (moved the code there because of the nilobjectexception error), I click the button and get the error
[code]If Not IsConnected Then
MsgBox(“ERROR: Not connected to the database! Cannot populate list!”)
End If
flowedheadslistbox.DeleteAllRows
Dim sql2 As String
sql2 = “SELECT jobnumber, owner, employee_name, enginetype, head_description FROM flow_head”
Dim data2 As RecordSet
data2 = mDB.SQLSelect(sql2) <----- ERROR HERE
If mDB.Error Then
MsgBox("DB Error: " + mDB.ErrorMessage)
Return
End If[/code]
I know the database is open, because there is another window I can click on and when I hit save, it queries the database to see if a record exists. I’m stumped…