hi,
Everaldo Ricardo write:
[Quoted Text] > Using msAccess 97 and a Pass-through query I can Insert in a ms-sql server > table, but I don't know how to get the identity
Use a SQL batch in your passthrough:
SET NOCOUNT ON; INSERT INTO dbo.ttype(val, idl) VALUES (123,123); SELECT SCOPE_IDENTITY();
The SET NOCOUNT is necessary to get only one result set.
The SCOPE_IDENTITY() functions returns the identity used in your insert table. [ at ][ at ]IDENTITY will return the last used identity. When your insert triggers an insert into another table, you will get the identity of the other table.
mfG --> stefan <--
|