Additional
dbCAP
AnyDAC
ThinDAC
NCOCI8
Topic: Update and empty field in primary key
Update and empty field in primary key
Posted: 2007/10/03 07:31
 
Wie have a table, and the primary key of these table consist of two string fields:
- the contents of the first fields is empty (but not nul) string in every records
- the contents of the second fields is "normal" (not empty string).

After the changes of a record the following happens:
- Wenn the CachedUpdates of the TADClientDataset is OFF, then at post appears an error message: "[AnyDAC][Dapt]-400: Update command update [0] instead of [1] record. Possible reason: update table does not have PK or row identifier...".
- Wenn the CachedUpdates of the TADClientDataset is ON, then at ApplyChanges happens nothing: there is no error message, but the changes are not posted.

The database is MS-Access.

Please help if you can,
Laszlo
Re:Update and empty field in primary key
Posted: 2007/10/03 21:20
 
Hello

Set FormatOptions.StrsEmpty2Null to False.

Regards,
Dmitry
Re:Update and empty field in primary key
Posted: 2007/10/03 23:14
 
Thanks, it works fine!
Laszlo