• Welcome, Guest. Please login.
 
September 17, 2019, 02:42:13 pm

News:

Welcome to the SQLitening support forums!


Still a problem with Database Busy

Started by Mark Strickland, March 18, 2008, 12:06:16 am

Previous topic - Next topic

Mark Strickland

I upgraded to version 0010 but I am still having trouble with a Database Locked error.

Here is a sequence that works --

1) Start Server
2) Start a session, do a single SELECT, destroy record set, disconnect, end session, exit program.
3) Repeat #2

This will work so long as you do a single SELECT.  If you do two selects (destroying the record set each time), disconnect, end session, exit program then the next time you start the program (leaving the server running) the start session gives the Database Locked error.

Also an UPDATE will NOT work if a select is done first.

I have verified that the record set variable is reset to zero when the destroy function returns.

I will email you a ZIP file of the project with all of the parts (DLL's, server, etc).

Mark Strickland, CISSP
www.SimplyBASICsecurity.com

Paul Squires

Thanks Mark. I got your email. I am checking into the situation right now.

Paul Squires

Hi Mark,

Looks like the SQLite client DLL was not updated in the 0010 zip
file. It was dated 2008-02-02. I have sent you the correct DLL. Using
this DLL seems to fix the problem (i.e. the new DLL correctly
destroys the recordset).

Sorry about that. I have re-uploaded the SQLite C/S package with the
correct client DLL for everyone else to use.

Mark Strickland

Paul,

Thanks for the quick response.  I will test it later today.  For a while I just thought "why don't I understand this"  ???

Once I get a feel for how to make the conversion from the Cheetah version of our pharmacy app I will put this thing "through the wringer"  ;D  and we will know how it responds in in a real world application.

I may take your suggestion to create a wrapper for creation of new record sets.  I don't think I have any places that I would need multiple sets on the same table.  I will likely create a global  :o  for each set I need and If it is not zero when I go to create a new set I will destroy it first.  On program exit I can run through the list and destroy any remaining record sets.

I am going to rethink some of my set navigation because SQL JOINs can eliminate nested loops required with a Cheetah type file manager.

If a set is not destroyed will it create a memory leak on program exit?

Thanks again.
Mark Strickland, CISSP
www.SimplyBASICsecurity.com

Paul Squires

Quote from: Mark Strickland on March 18, 2008, 11:30:45 am
If a set is not destroyed will it create a memory leak on program exit?

In theory, no, because Windows itself will clean up and reclaim any memory allocated during the running of your application. However, it is considered good programming practice to release the memory yourself - the SQLite C/S will not clean up the recordset memory if you do not ask it to.  :)


Fredrick Ughimi

Hello Paul,

>>Sorry about that. I have re-uploaded the SQLite C/S package with the
correct client DLL for everyone else to use.

Thank you for all your efforts.

Kind regards,
Fredrick O. Ughimi<br /><br />fughimi@gmail.com<br />- Freedom lies in being bold -- Robert Frost, Poet