You are not logged in.
Pages: 1
Hi,
while debugging some routines i normally change a field value in a table using an external tool (sqlitespy), to put in it a value that force the code to do what i expect.
My code used a tSQLRestServerDB to access the database , but now i'd like to use interfaced services.
If I use only ORM methods that access the database by the server instance, I may change the data from sqlitespy, but when i start e client session using tSQLHttpCLient, i cannot more do it. The program returns this error : Sqlite error 5 - database is locked.
I've posted the code. The lock happens in the line fClient.SetUser('User', 'synopse').
I have submitted this post only to understand if this is normal (the framework works without problems) or if this can be dued to some of wrong done defining server or client or so on.
Thanks in advance to anyone.
if fClient = nil then
begin
fClientModel := tSQLModel.create(servizi.Server.Model); // clone the server model
tout := params.HTTPTimeout * 1000;
fClient := tSQLHTTPClient.Create('localhost', Params.httpport, fClientModel, tout, tout, tout);
if not fClient.ServerTimeStampSynchronize then
begin
result := nil;
ShowMessage(UTF8ToString(fClient.LastErrorMessage));
exit;
end;
fClient.SetUser('User', 'synopse');
fClient.ServiceDefine([ICDAnagraphics], sicClientDriven);
fClient.OnAuthentificationFailed := RetryAfterTimeout;
end;
Offline
The SQLite3 file is locked in exclusive mode, for better performance.
See http://synopse.info/files/html/Synopse% … ml#TITL_60
Offline
tx very much.
Offline
Pages: 1