ultimatewilliam
Programmer
using ado, how should i explicitly lock a certain record before editing it so other users will not be able to edit the same record. is there a function that would place lock a record on a record and will return a value if the lock is successful?
as an example, i'm using msaccess database and i have a table named "Parameters" with a field Counter (numeric). This counter will increment and the value will be assigned to a certain record on two tables "Transactions1" and "Transactions2". To ensure that there would be noduplicate assignments, a record on "Transactions1" who needs a number on the "Parameters" table will first check if Counter is locked by a record on "Transaction2", if not, it will lock it, increment the Counter, take the value, then unlock it.
I don't know if this technique is wise or if you have something else in mind i would be willing to apply it.
thank you all!
as an example, i'm using msaccess database and i have a table named "Parameters" with a field Counter (numeric). This counter will increment and the value will be assigned to a certain record on two tables "Transactions1" and "Transactions2". To ensure that there would be noduplicate assignments, a record on "Transactions1" who needs a number on the "Parameters" table will first check if Counter is locked by a record on "Transaction2", if not, it will lock it, increment the Counter, take the value, then unlock it.
I don't know if this technique is wise or if you have something else in mind i would be willing to apply it.
thank you all!