I am trying to connect to a SQLite Database which is in the same directory as the .xojo_project. This project was formerly a Real Studio project which worked fine.
The lines I am using are:
Dim AROFile as FolderItem
AROFile = GetFolderItem(“AROData.rsd”)
If AROFile.exists Then
MsgBox(“It exists”)
else
MsgBox(“It Doesn’t Exist”)
End If
The last part tells me “It Doesn’t Exist”
It then goes on to tell me, quite correctly, that it can’t connect to the database
The GetFolderItem is relative to the location of the executable, so if you’re running a built app within your builds folder, that might be looking somewhere else than where it would look if you’re simply debugging the app.
It might help to reference the file’s absolute location, such as moving the file to your desktop and using SpecialFolder.Desktop.Child(“AROData.rsd”), or storing it within an appropriate application support folder.
for while you are debugging/developing the app. For the release version, it is better to put the database file in the SpecialFolder hierarchy somewhere (SpecialFolder.ApplicationData).