PDA

View Full Version : VB6/ADO problem with Update Criteria


Ad Dieleman
04-08-03, 15:52
In my application I'm using ADO recordsets with a client-side cursor.

I have set rs.Properties("Update Criteria")=adCriteriaKey, but still I'm getting error messages from the datagrid that the row cannot be found anymore after updating, which contradicts the use of the primary key only for checking on update integrity.

The table that is updated, has a trigger that modifies several fields and this causes the problems, but I cannot do without the triggers. After requerying the recordset I see that the data has changed as I wanted!

Ad Dieleman
04-08-03, 17:11
In the meantime I found the solution: in my trigger there were two subsequent UPDATE statements, each on a mutually exclusive subset of the rows. Combining these two UPDATEs into one did the trick.

Now I start wondering why this makes a difference...