Anyone had problem with SQLite on Raspberry Pi?

Hello all,

I have an app that has been tested with Windows 32/64, Linux 32 & 64 using both a COMM port and SQLite. They work perfectly. The same code, generated for Linux ARM does not work - failing to open the SQLite database. The DB is exactly the same in all three cases. The app runs, but fails to do its complete job since the database cannot be accessed.

Has anyone had a similar problem or any idea(s) what might be wrong?

The ARM platform is a Raspberry Pi 3, touchscreen display etc.

All ideas would be greatly appreciated!

Thanks,
Tim

SQLite works just fine on Pi. When you say “failing to open the SQLite database” does that mean that the file is not found or some other error? What does the Error and ErrorMessage properties have for values?

Hi Paul - thank you for your repsonse!

This is an example of the error:
clsdefaults_communication.Insert Operation cannot be completed because the database is closed., SQL Err

Same code used on all platforms.

This is the code that generated the error message:

    If (db.Error= False) then
      db.commit
      dbMessage = db.ErrorMessage
      dbErrorNo = db.ErrorCode
      If db.error = True then
        Dim L As New clsLogging
        Dim F() As String = array("EXCEPTION", "cls" +Tbl + ".Insert " +  db.ErrorMessage, "SQL Err" )
        L.AddFields F
        L.LogFileAppend("", 10)
      End If
    else
      dbMessage = db.ErrorMessage
      dbErrorNo = db.ErrorCode
      db.RollBack
      Dim L As New clsLogging
      Dim F() As String = array("EXCEPTION", "cls" +Tbl + ".Insert " +  dbMessage, "SQL Err" )
      L.AddFields F
      L.LogFileAppend("", 10)
    end if

Tim

Are you calling db.connect somewhere? And did it return True?

Hello Greg.

I apologize - I failed to give an additional reply earlier. It turns out the the problem lies not anywhere in the code shown, but in the OPEN functions. There was an error that was not being trapped properly. The error was a nil object exception due to an incorrect “path” statement which only appeared in a compiler directive for ARM.

Pauls feedback was very helpful. I think, had the ARM version been able to run on a Linux X86 environment it would have been easier to debug. But hey, these are the things that make programming challenging. If it was easy, everyone would do it!

Thank you both again for your responses!
Tim