Page 1 of 1

Problems with updates

Posted: Wed 23 Aug 2006 07:08
by serade
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!

Posted: Wed 23 Aug 2006 09:51
by Guest
I resolve my problem. The solution is the following.

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

The problem is solved. Thanks to all