Problems with updates

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
serade

Problems with updates

Post by serade » Wed 23 Aug 2006 07:08

Hi everyone!

I have some trouble with ODAC, and i´d like to ask the following: I have a TOraSession object, linked with a TSmartQuery, a TOraDatasource and DataControls of Borland, the query is SELECT * FROM TABLA ORDER BY PRIMARY KEY. (the primary key is of number type).

I have two instances of the objects (the other instance points to another table, but the table is simple and similar),
but their behaviour is different: i use the Edit() method of the TSmartQuery, and then the method Cancel() in the
two instances, but in one of them the cursor goes to the first row of the table.
This is an unwanted behaviour, and it always happens. I don´t find any difference between the two instances of the
objects, and i would like to know if i overstepped something...

Thank you very much for the answers and best wishes!

Guest

Post by Guest » Wed 23 Aug 2006 09:51

I resolve my problem. The solution is the following.

If I put SmartQuery1->KeyFields = THE PRIMARY KEY.

The problem is solved. Thanks to all

Post Reply