Record changed by another user.

J_Pygram

Member²
I think this may be a Borland issue rather than anything to do with DOA but I am sure that someone out there will know the answer.
I am using data aware controls (TDBEdit etc) with a DOA TOracleDataSet component to edit a subset of a larger table. If I make alterations to a record, scroll away and then scroll back I get the message "Record has been changed by another user." I have tried all sorts of combinations of Post() and Commit() etc but can not seem to shake off the problem.
Any help would be greatly appreciated.
John

------------------
John Pygram[/u]
JPygram@aol.com
 
Can you let me know what the SQL statement of the dataset is? If you are using calculations for a column, and use an alias with the same column name, you may have fooled the dataset. For example

select empno, ename, (sal * 100) sal from emp

When the dataset verifies this record, it thinks that sal has changed. You can fix this by using a different alias.

It can also be that you are using a before update trigger for this table that modify some column values. This can also fool the dataset. You can set the RefreshOptions to [roAfterUpdate] to fix this.

------------------
Marco Kalter
Allround Automations
 
Thanks Marko,
It was all to do with the refresh options. As you suggested I had a before update trigger which was causing a problem. Thanks for your help.
John

------------------
John Pygram[/u]
JPygram@aol.com
 
Back
Top