Jump to content

SQLite "Database Locked"


DjDeep00
 Share

Recommended Posts

I was wondering if there is any way that I can prevent the "Database Locked" message from happening?

Currently I am using a SQLite database which is located on a network shared folder and the SQLite.exe resides on the person's local machine. I have bout 8 people accessing the database at one time. They all are doing updates, inserts, and basic select query to the database.

Is there a way to queue up people or something else and not get the "Database Locked" message. Please help.

Link to comment
Share on other sites

well sqlite is not intended for concurrent connections.

write some failovers into your apps that if they get that error to simple wait a few seconds and retry the connection.

Also make sure each app closes the connection properly after it does it's thing.

This should help some.

Link to comment
Share on other sites

You can have more then one connection, heres some tips:

When using _SQLite_Query() make sure to use:

_SQLite_QueryFinalize() and _SQLite_QueryReset ()

Make sure every Query does that.

Execs do not matter.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...