recurse,
Can you give me a sql example of using "WITH locking" or somewhere I can read about it?
I´m using ADO and, in theory, recordset locks should resolve this kind of problems (to be able to lock a record)...however it doesn´t work. Microsoft and everywhere I read about locking says that or we use "with statements" or recordset locks, not the two of us at the same time, but I think that "with statement" is the only way to lock a record.
For instance, imagine there are 2 computers using the same application and the same database. Computer A makes a select and gets two records and it will edit the first one.
While he is editing(and making calculations that probably will change the record), the second computer makes the same select, getting the same records...(the first record being editing wasn´t updated yet! Even that I choose pessimistic locking in the recordset, computer2 will always be able to get and edit the first record...because computer1 didn´t lock the record he was editing (that will or not be in fact updated...) Is true that computer1 may never change the record he is editing, however if he change it, computer2 will be making calculations with a value that as changed... so the calculations will be wrong.
I think Ado as a "record" object, not the "recordser" object that it should able us to do such lock... however I never use it...
Any ideias?
Sérgio Oliveira