>>Also...Naomi's suggestion about INSERT INTO...OUTPUT is a good one, especially if that INSERT is inserting multiple rows. The OUTPUT piece allows you to get at the specific value(s) as a result of the INSERT. It's like getting an "echo" of what the insert eventually did. It's a great feature.
>
>I read about the difference between @@IDENTITY and SCOPE_IDENTITY and aside from a "trigger" problem they work the same. And I don't have triggers.
>
>Until I can "see" that OUTPUT will help, I won't change code that works for 99.99% of the customers. Btw, This "Insert" only one row.
>
>Plus, I am using VFP Cursor Adapter and I don't know, yet, if OUTPUT can be applied to the class I created (based on CA).
>
>Thank you.
You're choosing between 100% reliable code and 99% reliable. You already got cases where the code failed. Why would you want to keep that code?
If it's not broken, fix it until it is.
My Blog