Hi

To access the database on neworks we have tried with
file sharing concepts. But when two applications on network
try to communicate simultaneously, Database is giving
writelock and read lock problems.




here is the detailed explanation and sample code

We have tested the keyDB both in Linux and Windows network.
Our actual requirement is some thing like this:



We have an application written in Delphi7, we have placed
this appliocation (same copy) on two systems say SystemA
and SystemB and

we placed KeyDB database on SystemC (Windows/Linux). Now
when we tried to connect to KeyDB which is on SystemC from
SystemA and SystemB simultaneously, we are getting
Read/Write lock errors.

So we want to know how to overcome the read & write
lock errors through coding.

Here is the code what we are using:

Constructor KeyDbData.Create();
begin
self.sqlTable:='';
database:=TUdbDataBase.Create(nil);
database.DataBaseName:='\\ibmserver\g\amicus.udb';
tempquery:=TUdbQuery.Create(nil);
tempQuery.Database:=database;
end;



function KeyDbData.executeQry(sqlstr:TStrings):longint;
Begin

query:=TUdbQuery.Create(nil);
Database.LockRetryMaximum:=1000;
Database.LockRetryInterval:=1;
query.Database:=database;
query.SQL:=sqlstr;
query.ExecSQL;
query.Destroy;
end;

So I request, if you have any code samples to over come the problems of read lock and write lock problems

thanks,
sudhakar