Return IDENTITY for SQLCE3.5

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Jatvarthur
Posts: 7
Joined: Thu 14 May 2009 12:46

Return IDENTITY for SQLCE3.5

Post by Jatvarthur » Thu 04 Jun 2009 13:20

Hello, we also have a problem with retrieving IDENTITY fields after inserting records into TUniTable with SQLCE. For instance, I have TUniTable with QueryIdentity=True and Options.ReturnParams=True, and when I execute Append () and then Post (), the primary key filed isn't updated to reflect the value generated by DB. This causes many side effects, for example, it is impossible to edit newly appended value in TDBGrid, while trying to do so, it raises an exception saying 'Refresh failed. Found 0 records'.
How can I fix this? Thanks.

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Fri 05 Jun 2009 07:47

To solve the problem you should set Options.ReturnParams to False.

Post Reply