Mega Code Archive

 
Categories / Delphi / ADO Database
 

Tclientdataset, auto-increment fields

Question: We want to add several records that contain auto-increment fields to the ClientDataSet and then apply it to the remote datamodule. The key field is an auto-increment field. How is this done? Answer: You should be able to just leave this field blank on the client application and it will be initialized when you call ApplyUpdates to insert the record. If you need to see the generated value back on the client, call Refresh.