How can I get the value of the identity column to my TMSQuery dataset after an insert ?
I'm using the TMSQuery component with an insert sql (generated).
(when I remove the insert sql and let SDAC do it automatically it works fine)
I also tried the returnparams and queryidentity options, but that did not help.
SDAC trial version 3.50.0.11 ( win32 delphi 2005 ) Sql2000
CREATE TABLE [dbo].[parts] (
[part] [int] IDENTITY (1, 1) NOT NULL ,
[description] [varchar] (100) NOT NULL
) ON [PRIMARY]
GO
TMSQuery : Select = select part, description from parts
TMSQuery : insert sql = INSERT INTO parts (description) VALUES (:2)
SET :1 = SCOPE_IDENTITY()