A problem occured while inserting a record in table "xx", record "" Can't refresh delta, record isn

Hi everybody,

i got the error above, with following configuration, if i Append, Post and ApplyUpdates to the server.

IDE: Delphi XE
DataAbstract: Release Spring 2012
DB-Connection via UniDac Version 4.1.4
Database: Firebird 2.5 or MySQL 5.5, (DBMS seems unimported)

i just create a “blank” client/Server DataAbstract project, using the Wizard.
Adding a DBNavigator + DBGrid to the clientform and link them to the datasource in the Clientdatamodul.
Starting client and server and trying to add a new entry to the table via append, post, ApplyUpdates.

Primary key field “ID” is blank before posting data, because it’s an autoinc field.

^^ Ends up in the error:
A problem occured while inserting a record in table “xxxxx”, record ""
Can’t refresh delta, record isn’t found

Did i overlook some simple switch or what’s the problem here ?

Regards Data

Hello,

How is your your autoinc PK field defined in Schema? For example for Firebird DB DataType for such field should be datAutoInc, GeneratorName from DB should be set as well and it should be marked as Required. In this case when you append data in data table PK field is set as negative values (-1, -2, …) and new incremented value will be returned from server after ApplyUpdates. Thus you will avoid attempts save empty PK values.

Hope this helps

Thanks, I faced the same problem, and this solution worked fine with me.