Get Id Inserted in Table (Delphi + SQL Server with Devart)
Posted: Thu 25 Aug 2011 23:03
Hi,
I'm using ClientDataSet + TDataSetProvider to insert record in a single table.
In the event AfterUpdateRecord of the TDataSetProvider i'm making a database connection (using the same TSQLConnection of TSQLDataSet connected) to get the SCOPE_IDENTITY the inserted row, but it is always returning 0 (or null) ..
Any idea about this problem?
There may be some bug with the driver?
Tks for attention
I'm using ClientDataSet + TDataSetProvider to insert record in a single table.
In the event AfterUpdateRecord of the TDataSetProvider i'm making a database connection (using the same TSQLConnection of TSQLDataSet connected) to get the SCOPE_IDENTITY the inserted row, but it is always returning 0 (or null) ..
Any idea about this problem?
There may be some bug with the driver?
Tks for attention