[thelist] SELECT SCOPE_IDENTITY() not working in new DB

Casey Crookston caseyc at IntelliSoftmn.com
Fri Jul 7 16:58:28 CDT 2006


Using MS SQL, I'm using SELECT SCOPE_IDENTITY() to harvest the id of a
record just created.  It works great!  But, we needed to rename the
database, which you can't seem to do in MS SQL (right?).  So I created a
new database, exported all the tables and content, duplicated the user.
I *thought* I had simply made an exact duplicate of the original
database, but when executing the page that uses SELECT SCOPE_IDENTITY(),
it errors out at that point.  

 

To be sure, I switched back to the original database in the web.config's
connection string, tried the page again, and it worked fine.

 

That the heck?

 

Casey




More information about the thelist mailing list