SQLite Database Location - Livecode 8

Creating desktop or client-server database solutions?

Moderators: Klaus, FourthWorld, heatherlaine, robinmiller, kevinmiller

Post Reply
Stewart Lynch
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 23
Joined: Sun Jul 13, 2008 7:39 pm

SQLite Database Location - Livecode 8

Post by Stewart Lynch » Wed Jul 27, 2016 10:45 pm

I am returning after many years to Livecode (got the indy bundle)
I was working thought this lesson on mySQL http://lessons.livecode.com/m/4069/l/56 ... e-database and am quite perplexed by the whereabouts of the sqlite database.
Currently I am testing on a Mac using Livecode 8.0.2 rc-3

I define the dbName and location as via

Code: Select all

 put specialFolderPath("documents") & "/runrevemails.sqlite" into tDatabasePath 
A result from put tDatabasePath returns

Code: Select all

/Users/stewartlynch/Documents/runrevemails.sqlite
The lesson app works as designed, but I cannot find the database runrevemails.sqlite anywhere on my computer. It is certainly not in the /Users/stewartlynch/Documents/ directory.

To make matters even more peculiar, when I build the app as a standalone, and run it, it also works.
I have discovered here, that the database is created in the apps package contents and is simply called dDatabasePath
This is all very troublesome, because I want to build an app with a predesigned sqlite database that I want my app to be able to open from a defined path yet I cannot figure out why a) I can't find the database when in development mode, and b) why the database has a different name (the variable name) and is in the application bundle when I build as a standalone.

Can anyone shed any light on this?

Klaus
Posts: 11197
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: SQLite Database Location - Livecode 8

Post by Klaus » Wed Jul 27, 2016 11:37 pm

Hi Stewart,

just to be sure, you are writing two different variable names here:
... specialFolderPath("documents") & "/runrevemails.sqlite" into tDatabasePath
and later:
... created in the apps package contents and is simply called dDatabasePath
A simple typo in your posting?
If not, this will surely be the culprit!


Best

Klaus

Stewart Lynch
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 23
Joined: Sun Jul 13, 2008 7:39 pm

Re: SQLite Database Location - Livecode 8

Post by Stewart Lynch » Thu Jul 28, 2016 12:04 am

Yes, I am quite embarrassed. Indeed, I did have a typo and I discovered it myself before I had a chance to read your reply and delete this thread.
Sorry for the noise.

Klaus
Posts: 11197
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: SQLite Database Location - Livecode 8

Post by Klaus » Thu Jul 28, 2016 9:06 am

Hi Stewart,

don't worry, you are not alone! :D


Best

Klaus

Post Reply

Return to “Databases”