PDA

Click to See Complete Forum and Search --> : Cascading IDENTITY columns


Sep 14th, 2000, 08:31 AM
I have an age old problem that I thought you might be able to help with.

In simple terms I have two related tables, where the Parent Table contains an IDENTITY column that is being used as the PRIMARY key. While using VBScript I need to be able to return the value back to the client application and cascade this value as the foreign key into the child table.

After using the INSERT statement, I am then using the T-SQL statement 'SELECT @@IDENTITY as 'IDENTITY'.

The draw backs to this is that you can never be to sure if your getting the identity value that your session created.

Any thoughts ??

H