SQLite Connection Limit
More on this..
The database is being locked but the problem is that DataBaseUpdate() is taking several minutes to return so the error can be read when it is. The lock is no problem, the software cause just pause for a few seconds and re-try.
It seems to only happen when the database is on a network drive and accessed by more than one application.
So, is there any reason that any of the query functions would take so long to return with the "database is locked" error?
The database is being locked but the problem is that DataBaseUpdate() is taking several minutes to return so the error can be read when it is. The lock is no problem, the software cause just pause for a few seconds and re-try.
It seems to only happen when the database is on a network drive and accessed by more than one application.
So, is there any reason that any of the query functions would take so long to return with the "database is locked" error?
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Good, then I'm not crazy! Even trapping the error is causing a 1+ minute delay so it's a pretty serious problem.
When I was using the SQLite lib directly before (though a userlib) that didn't happen so I'm guessing it is something with the new PB->SQLite hook.
Fred? Help!?
When I was using the SQLite lib directly before (though a userlib) that didn't happen so I'm guessing it is something with the new PB->SQLite hook.
Fred? Help!?

-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Karbon,
You are not alone. I am also having trouble with database locks when using the databaseupdate command. I suspect the problem is with the PB wrapper, as I have used this SQLite database with several other languages, including RealBasic and Powerbasic. I am not having any trouble querying the database. However, any attempts at updating the database results in a lock. I have tried numerous approaches to prevent this, but perhaps I am missing something.
npath
You are not alone. I am also having trouble with database locks when using the databaseupdate command. I suspect the problem is with the PB wrapper, as I have used this SQLite database with several other languages, including RealBasic and Powerbasic. I am not having any trouble querying the database. However, any attempts at updating the database results in a lock. I have tried numerous approaches to prevent this, but perhaps I am missing something.
npath
There isn't any way to unlock a database except for all clients to release the lock. In my case I know it isn't locked even when my PB application is telling me it is. I've written another utility in C to connect to the SQLite database and issue SELECT and UPDATE queries - those queries complete but any queries issued through the PB application fail... Using the straight C API the query functions return instantly if the database is locked.
Locking is tricky with SQLite since it locks the entire database when a write operation is in progress. Still, the DatabaseQuery and DatabaseUpdate function should return instantly if the database is locked.
Locking is tricky with SQLite since it locks the entire database when a write operation is in progress. Still, the DatabaseQuery and DatabaseUpdate function should return instantly if the database is locked.
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Only in C, and it is all right here : http://www.sqlite.org/c_interface.html
Can't use any of that inside a PB application though. I wrote a standalone program to access my databases.
I've ported all the database access to use the PB Database library function so I hesitate to try to find a userlib that directly uses the SQLite DLL at this point. Hopefully it is something Fred & CO can sort out for us pretty quickly -- they do rock after all
Can't use any of that inside a PB application though. I wrote a standalone program to access my databases.
I've ported all the database access to use the PB Database library function so I hesitate to try to find a userlib that directly uses the SQLite DLL at this point. Hopefully it is something Fred & CO can sort out for us pretty quickly -- they do rock after all

-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Thanks Karbon,
I too have rewritten an application, converting over to built-in SQLite database functionality in PB. I will also wait for a fix, and try to find a work around in the meantime. I have versions of the application in numerous other languages, and find that Purebasic is the best of all. Fred and the team have done an amazing job.
I too have rewritten an application, converting over to built-in SQLite database functionality in PB. I will also wait for a fix, and try to find a work around in the meantime. I have versions of the application in numerous other languages, and find that Purebasic is the best of all. Fred and the team have done an amazing job.
- Fangbeast
- PureBasic Protozoa
- Posts: 4789
- Joined: Fri Apr 25, 2003 3:08 pm
- Location: Not Sydney!!! (Bad water, no goats)
[quote="Karbon"]Only in C, and it is all right here : http://www.sqlite.org/c_interface.html
Can't use any of that inside a PB application though. I wrote a standalone program to access my databases.
I've ported all the database access to use the PB Database library function so I hesitate to try to find a userlib that directly uses the SQLite DLL at this point. Hopefully it is something Fred & CO can sort out for us pretty quickly -- they do rock after all :-)[/quote]
Karbon, I use TS-Soft and company's SOURCE wrapper that directly imports the pb4.2 statically linked sqlite lib functions and it works a treat. Now that I almost know what I am doing (LOL).
So, it's not a user lib, it's a source format wrapper. That way, you can inspect and modify it yourself.
Can't use any of that inside a PB application though. I wrote a standalone program to access my databases.
I've ported all the database access to use the PB Database library function so I hesitate to try to find a userlib that directly uses the SQLite DLL at this point. Hopefully it is something Fred & CO can sort out for us pretty quickly -- they do rock after all :-)[/quote]
Karbon, I use TS-Soft and company's SOURCE wrapper that directly imports the pb4.2 statically linked sqlite lib functions and it works a treat. Now that I almost know what I am doing (LOL).
So, it's not a user lib, it's a source format wrapper. That way, you can inspect and modify it yourself.
There are OSL and inc files around for using the SQLite API directly. Probably all tips and tricks SQLite posts more than 3-4 months old are not using PBs implementation.
Paul Dwyer
“In nature, it’s not the strongest nor the most intelligent who survives. It’s the most adaptable to change” - Charles Darwin
“If you can't explain it to a six-year old you really don't understand it yourself.” - Albert Einstein
“In nature, it’s not the strongest nor the most intelligent who survives. It’s the most adaptable to change” - Charles Darwin
“If you can't explain it to a six-year old you really don't understand it yourself.” - Albert Einstein
Hi Fang.. Is there a definitive version of the include you're using? I see several with 8 pages of suggestions and reports of strange things.. Where is the latest version?
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
The latest version should be here : http://www.purebasic.fr/english/viewtop ... 853#240853Karbon wrote:I see several with 8 pages of suggestions and reports of strange things.. Where is the latest version?
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
- the.weavster
- Addict
- Posts: 1576
- Joined: Thu Jul 03, 2003 6:53 pm
- Location: England