Database Build in Windows

When I build using the RealSQLDB for OS, it works perfectly. I do not need to CONNECT to the Database.

When I start in Windows, I get a NIL error. Do I need to CONNECT to the Database ?

Any idea what is wrong here ?

you always need to connect to the database…

please refer to the database examples that came with Xojo for details

I probably got a wrong impression the the RealSQLDatabase is internal to the App. Would not need nor accept a CONNECT … I wil write the code to connect then …

Still having issues … how do I code to get to a .dll Database ? I can not see the .sqlite as I am using the internal RealSQLDatabase ?!

RealSQLdatabase IS SQLLite

Dim dbFile As FolderItem
   dbFile = GetOpenFolderItem("")
   
   If dbFile <> Nil Then
        Dim db As New RealSQLDatabase
        db.DatabaseFile = dbFile
        If db.Connect Then
             MsgBox("Connected to " + dbFile.Name)
        Else
             MsgBox("Error: " + db.ErrorMessage)
        End If
   End If

If you drag the database into the app, then IT IS NOT PORTABLE. If you move the app to another machine, you will have problems unless the files are in the exact same paths as on the original machine.

Can you please tell me where the database examples are that come with Xojo? I just downloaded last night and I’ve been poking around but I can’t find the database examples. I may just be tired but it would help if someone can point me to the resource. I have experience using MySQL (with Perl on a web serer) so I just need to see examples of connecting, writing, reading etc.

Thank you for your time.

on you computer.
folder Example Project --> Database
under the folder with XOJO app is

I would suggest that you see the Sample Applications.

The issue was exactly what Tim just told us … I drag the DB to the App. Had to find a way to solve, but is building in Windows now.