ranta
Programmer
- Jun 24, 2003
- 30
I have a function which is insterting a record into a table and then using SCOPE_IDENTITY() to return the newly created ID for that table.
This all works fine untill I call the function within a loop, then the SCOPE_IDENTITY() returns a NULL.
Does anyone have any idea why this is happening, is it even possible to insert statements in a loop retrieveing the IDENTITY each time????
This all works fine untill I call the function within a loop, then the SCOPE_IDENTITY() returns a NULL.
Does anyone have any idea why this is happening, is it even possible to insert statements in a loop retrieveing the IDENTITY each time????