I have an ASP Classic app on SQL 7 (recently migrated from earlier SQL version) and now @@IDENTITY fails (returns NULL). I have been searching the knowledge base and cannot make heads or tails of the preferred method of primary key retrieval for ASP Classic/SQL 7. I see lots of talk of SCOPE_IDENTITY and ExecuteScalar() and @@IDENTITY but nothing definitive for our platform.
Our "quick and dirty" for the time being is to simply use "SELECT MAX(key_column)" and hope for the best.
Can anyone direct us on the best method for key retrieval under this platform?
Start Free Trial