View Full Version : SQLite Issue
azmanar
12-23-2005, 02:04 PM
Hi,
I published the SQLite template http://www.indigorose.com/forums/attachment.php?attachmentid=2627
into web/email executable file. Then I launched the exe. Entered some test data and saved it. I closed it and relaunched it. The data I entered are lost everytime ( empty ). Why is this?
If I published the same SQLite template as Hard drive folder, the data is retained. However, I noticed that all the related autoplay folders can be seen.
How can I publish the SQLite template as EXE file and retain the data I entered?
rhosk
12-23-2005, 02:15 PM
Not too keen on the SQLite side of things, but I would think that you'd have to copy the database on the hard drive somewhere, then save data to it. The compressed executables are temporarily extracted to the user's temp folder, then deleted when exited.
You first have a couple things to realize. The database itself was written to, when you first launched, but using a Web EXE, the app was extracted to a "temporary" location. The next time you run the app, the files are extracted, and the database is reset, or it is in a totally different location. You'll need to copy the sqlite database to a "fixed" place on the hard drive, then use that database in your app. This way you'll always be using the same database, not the one being extracted or created when the app is run.
azmanar
12-23-2005, 02:30 PM
Hi Rhosk and Worm,
Thanks for the replies. Not on holiday yet?
If the only way to retain the data with an EXE app is by having the DB file on the outside, then it will be seen by prying eyes and itchy fingers. SQLite db files can be opened even by NOTEPAD.
So I have to hide db files away somewhere in the C Drive.
rhosk
12-23-2005, 02:38 PM
Hm, I guess you could encrypt it or password protect it (zipped?). Other than that, if it's 'sensitive' data, you may want to think of other solutions.
azmanar
12-23-2005, 03:07 PM
Hm, I guess you could encrypt it or password protect it (zipped?). Other than that, if it's 'sensitive' data, you may want to think of other solutions.
Yup. Password protect the APPs is a solution and hide the DB files linked to it right away. Thanks for the advice.
A short background to fill the gap. Currently I'm helping a company produce educational videos. A very hyperactive environment there, with people coming in and out of the studio, including curious cats. heheh.
azmanar
12-24-2005, 01:53 AM
Hi,
I did slight changes to the SQL Phone Book downloaded from this forum.
Added 4 lines to give flexibility for Autoplay users to set their DB files anywhere they wish in the PC. Users can also rename their DB folders and DB filenames to anything they wish.
The changes made still maintains the previous function of this App, where the DB folder, SQLite DB file and tables will automatically be created if they are not there.
Just like PHP config files, you're ready to roll without messing up main scripts.
Hope this is useful to new users. Attached is the APZ file.
Thanks.
azmanar
12-24-2005, 04:08 AM
Hi,
The changes made still maintains the previous function of this App, where the DB folder, SQLite DB file and tables will automatically be created if they are not there.
Thanks.
Sorry, the first file I uploaded did not include AUTOMATIC CREATE FOLDER. User have to manually create the folder to use the app.
The attached update will CREATE FOLDER automatically, if it does not exist. If it exist, it will end and not do anything.
Thanks.
azmanar
12-24-2005, 01:30 PM
Hi,
I have extended MyPhoneBook further with the following functions:
1. Printable Single Record
2. Save Single Record On Desktop
3. Send E-mail
When you select a record from the ListBox, you normally see the entries on the right side. You can only reference from it.
I have extended it with a SNAP Button for the selected record. Once you click the SNAP button, the selected record is transfered into a single printable page. This SNAP page is formatted in a WebObject.
On that page you can do 3 things:
1. Click Print and then choose your default printer to print it out
2. Save the file on a folder on your desktop
3. Send E-Mail by clicking the email link ( which will launch your default email software )
.. and then of course, a Back to Main button.
In fact, MyPhoneBook ( which was first uploaded by Desmond http://www.indigorose.com/forums/showthread.php?t=11869&highlight=phonebook ) can be extended to lots of powerful desktop apps.
Some Desktop Apps examples are:
1. Personnel Records
2. Training Registration Records
3. Membership Entries for an NGO
4. etc..
To use on an INTRANET, you need to change the DB to MySQL or other DBs.
Hopefully this post is useful. Attached is the extended APZ.
JDog37
01-22-2009, 12:28 PM
Hello, I tried this by adding one entry in it and I got: "C stack overflow"
Then I got this error: "On select, line 141: Data passed to SQLight.close() was closed".
:huh
What dose this error mean? :wow Then i had to use the task bar to close the app.
JDog37
01-23-2009, 05:53 AM
Has anyone got this to work without errors?? :rolleyes
JDog37
01-25-2009, 12:48 PM
I guess not.
Dermot
01-25-2009, 02:00 PM
The code is causing an infinite loop which will cause the error. Look for this line in the DisplayRecords function in Globals and remove it.
SelectListboxItem(nRecordID);
The DisplayRecord function is called from the On Select of the listbox which in turn is selecting the item in the listbox again so it goes into a never ending loop.
JDog37
01-25-2009, 10:09 PM
Thank you Dermot! :yes:yes
Joe
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.