Embedding SQLite in the EXE


#1

Okay, call me dense! I want to embed a read-only database into my EXE output. I have read the documentation about using something like:
$storagelocation = exo_getglobalvariable(‘HEPubStorageLocation’, ‘’);
$dbname = $storagelocation.‘mysqlitedb.db’;

and that the database will be in the ‘Data’ folder … is that a virtual folder or a folder on my hard drive? I have tried putting my database in ‘Data’ in the structure of the files/folders being compiled. I have tried using
$storagelocation = exo_getglobalvariable(‘HEPubStorageLocation’, ‘’);
$dbname = $storagelocation.‘mysqlitedb.db’;
AND
$storagelocation = exo_getglobalvariable(‘HEPHPDataPath’, ‘’); $db = $storagelocation.‘musanizer-utilities.db’;

It is not loading. I still get an error message about no such table when I try to do a query. I just don’t understand what I am doing wrong. The directions seem to assume that I know more than I do! :smile:

Thanks for help,

Frank


#2

Forget this. I can’t see how to delete it. I arrived at the answer just a few minutes after I posted it.


#3

Please i need the answer, you can send it to my mail, [email protected]


#4

Just add your sqlite database to the File Manager in ExeOutput for PHP. Then you can access it with

$path = $_SERVER[‘DOCUMENT_ROOT’].'/mydb.db';

Alternatively, run the Chromium demo that ships with ExeOutput. It tells you how you can access compiled files. You even have small code samples.