Topic: the MVD application in a LAN network problem

I am using the MVD application in a LAN network and the result is having a problem with the database being locked when one of the users inputs data. is there a solution to my problem?

Post's attachments

Attachment icon eror.jpeg 170.89 kb, 209 downloads since 2023-03-29 

Re: the MVD application in a LAN network problem

For full multi-user access, use the MySQL DBMS

Визуальное программирование: блог и телеграм-канал.

Re: the MVD application in a LAN network problem

I use multiuser, the database uses sqlite. does sqlite not allow for LAN network?

Re: the MVD application in a LAN network problem

Work over the network is supported, but there is a problem of blocking the database at the time of writing (and sometimes editing) data. This is due to the fact that the database has a file nature.
Also at the code level, a SQLQuery() command can cause a lock. Therefore, it is strongly recommended to free DataSet right after using.

Визуальное программирование: блог и телеграм-канал.

Re: the MVD application in a LAN network problem

How to free DataSet right after using??

Re: the MVD application in a LAN network problem

var
  tmpDataSet:TDataSet;
begin
  SQLQuery('SELECT name FROM table',tmpDataSet);
  try
    // some code for get data from dataaset...
    ...
    //
  finally
    tmpDataSet.Free;
  end;
end;
Визуальное программирование: блог и телеграм-канал.

Re: the MVD application in a LAN network problem

Sqlite is not multiuser per se, you can read data from multiple places but only one user can record data at a time. Sqlite is not recommended in multi user usage as data consistency is at risk when data recording is not guaranteed as it is with an RDBMS like MySQL or MariaDB or MSSQL Server to name only a few compatible with MVDB.

Re: the MVD application in a LAN network problem

var
  tmpDataSet:TDataSet;
begin
  SQLQuery('SELECT name FROM table',tmpDataSet);
  try
    // some code for get data from dataaset...
    ...
    //
  finally
    tmpDataSet.Free;
  end;
end;

k245, thanks you.. I wil try this code
tcoton, thanks you for your advice  I will try use MySQL too