Hi.
I have a sqlite data base which has a table named Customers. And I implemented few functions to change the data about a customer.
They are like
changeName(int id, string newName);
chgangeTP(int id, string newTP);
changeAddress(int id, string newAddress);
changeEmail(int id, string newEmail);
changeNotes(int id, string newNotes);
and my problem is sqlite locks the database for editing purposes, as they say.
So if user wants to change multiple columns at once, it would cause an error.
for example >>
if user tried to edit both name and address, the program first calls changeName() function which locks the database to edit the name and then unlocks, and then it calls changeAddress() function which locks the database againg to edit the address and then unlocks again.
if program would be a bit faster than the database locking and unlocking task, the program will be trying to edit the address before it unlocks after editing the name.
So I want to know if there's a way to check if sqlite database or data table is locked.
Just like >>
while(myDatabase.Locked)
thread.Sleep(300);
changeAddress(500, "hell");
thanks in advance !