Naomi,
to me this looks like the ID field is not written from CA to the database, and the database uses a default value.
Check values of
UpdatableFieldList and UpdateNameList
for the ID field. Check that UpdateNameList holds the right DBC!Table.Field expression for the target.
I do not understand if you create the record with the CA or just update an existing one.
But this is not a big problem
Use the Method BeforeUpdate (add some code like)
LPARAMETERS tcFldState, tlForce, tnUpdateType, tcUpdateInsertCmd, tcDeleteCmd
?tcUpdateInsertCmd
debug
suspend
Check the output, this should be the command that is used for UPDATE or INSERT for the field you are missing.
HTH
Agnes
>Hi everybody,
>
>I've just spoken with my former colleague.
>
>Here is a problem. The business object can autogenerate an ID field. With the local view this autogenerated value then saved into the database.
>
>With the CursorAdapter the autogenerated key seems to be ignored and the different key is put into the database when the record is saved.
>
>I'm thinking that there has to be the native property of the CA that is responsible for generating ID (or taking them from the cursor).
>
>Do you know what the name of the property is if this property exists? We're using GUID for our PKs.
>
>Thanks a lot in advance.
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord
Weeks of programming can save you hours of planning.
OffThere is no place like [::1]