sqlite 'invalid database type' error in standalone

Creating desktop or client-server database solutions?

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
jjsp
Posts: 2
Joined: Thu Jan 02, 2020 1:33 pm

sqlite 'invalid database type' error in standalone

Post by jjsp » Thu Jan 02, 2020 3:36 pm

Hi,
I have searched the forum for a solution to my problem but can't seem to find anything that works. I am using the latest version of LC (community) on windows. I'd be grateful for any help as I'm starting to wonder is it just me or is there a bug in LC.

I can access the database in the IDE but not in a standalone. I am using the code....

put "DB" into ldatabasename
put specialFolderPath("Engine") & slash & ldatabasename into ldatabase
get revOpenDatabase("sqlite", ldatabase, , , , )

I have also tried

put "DB" into ldatabasename
put specialFolderPath("Engine") & slash & ldatabasename into ldatabase
get revOpenDatabase("sqlite", ldatabase )

The database is located in the same folder as the standalone.

In the standalone settings I have tried automatically detecting inclusions and also tried manually selecting the inclusions
sqlite
database (tried with and without)
ssl
HTTPD
Answer
Ask

It does work when I save as a standalone for Windows using runrev 2-8-1 on my OSX machine and then run the standalone on Windows 10.

I have been using this platform since runrev 2-8-1 and can usually find a solution but not this time :(

Thanks in advance for any advice.

Paul

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

Re: sqlite 'invalid database type' error in standalone

Post by Klaus » Thu Jan 02, 2020 3:55 pm

Hi Paul,

welcome to the forum!

Couple of things:
1. Everything we add to our standalone via the "Copy files" tab in the "Standalone Appliction Settings" can be found here:
-> specialfolderpath("resources") in the final runtime.

Hint: We should REALLY use this feature!

2. If your runtime get installed into the "Applications" (Mac) and/or "Program files" (Windows) only users with ADMIN
permissions are usually allowed to WRTIE in that folder and even opening a database is considered "WRITING"!
So you need to copy that database file to any folder (e.g. specialfolderpath("documents")) and then open it threre!

See my example here:
https://forums.livecode.com/viewtopic.p ... 36#p183562

Same applies to the mobile platforms Andoid and iOS!

Hope that helps.


Best

Klaus

jjsp
Posts: 2
Joined: Thu Jan 02, 2020 1:33 pm

Re: sqlite 'invalid database type' error in standalone

Post by jjsp » Fri Jan 03, 2020 1:51 am

Thanks a million. All is working now.

Post Reply

Return to “Databases”