Topic: pls. suggest about multi user database

i have placed the sqlite.db at shared location in a lan network it works fine with3~4 users. but when user-1 adds any data it cannot be shown by others & similarly others also. is there any way to update database without restarting the application. any suggestion will be highly appreciated.

Re: pls. suggest about multi user database

Hello nrmuduli,


I might be wrong, but I think the sqlite.db is in exclusive locking mode, meaning that only one person can access a particular table at the same time. Because of that, people working on the same "function" might get the "database locked message" if attempting to do the same thing at the same time.


In the same idea, the file is, by default, in asynchronous mode. This is why, when a user updates or adds a record to a table, the other users don't see it at once.

On Form with tablegrids you could add "TableGrid1.dbUpdate" on the Onshow of the Form.
Other objects, if linked to the database, should refresh on Close and reopen of the Form I guess.


Let's wait to see what Dmitry will answer on the subject, and eventually correct me if I said silly things.



Cheers


Mathias

I'm a very good housekeeper !
Each time I get a divorce, I keep the house

Zaza Gabor

Re: pls. suggest about multi user database

hello mathmathou,

you are right the table grides are updated but at same time the combo boxes are not updating.

Re: pls. suggest about multi user database

nrmuduli
You can place button and call procedure to refresh all TableGrids and ComboBoxes

procedure Form1_Button1_OnClick (Sender: string; var Cancel: boolean);
begin
    UpdateDatabase('tablename1'); 
    UpdateDatabase('tablename2');
end;

just list the names of the tables



Thanks.

Dmitry.

Re: pls. suggest about multi user database

hii Dmitry,

this works like charm. you really saved my work. kudos to you....