How to "block" a record with SQL command in an Advantage database local server?

37 views Asked by At

I have a small project that use very few tables with Advantage Local Server.

The database is used by 2 PC's and 2 Windows Delphi apps each.

I need to update a record in one table that it is like an ID that needs to be unique.

How can I get sure that anyone else it's updating the same record on the same table?

As I mention, I am using ALS, so I can't use transactions.

I have this code, I think I read somewhere else that this statement was blocking the record.

qry.sql.clear
qry.sql.add ( 'select number from table where 1 = 1 )
qry.open

Can anyone give me some advice?

Unfortunately Advantage does not have anything like an WITH LOCK statement in the commands.

Thanks

0

There are 0 answers