Page 1 of 1

procedure for cached updates and serial field

Posted: Fri 28 May 2010 21:27
by doublehelix
I've been attempting to create a cached update table with dev express, unfortunately their table requires a record key field in order to function properly. This is ok when first reading. However, because I am using a cached update, any new records cannot be accessed because they have no record number and dev express requires it before it will move to the record. I've solved this by creating a index value that decrements creating temporary indexes below 0 and assigning the value to the record key field when a new record is created. The problem is that I want to replace the negative numbers when an update is applied with the actual serial value from the database. How do I do this? I realize that it might possibly be in the on update record event, but I do not know how to implement this.

Posted: Mon 31 May 2010 11:58
by bork
Hello

You should set the SequenceMode property to the smInsert value. In this case your key field will be filled by sequence on calling the Insert method and you can resolve your issue without any temporary indexes.