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

Ken Schaefer Ken at adOpenStatic.com
Fri Jul 7 21:56:52 CDT 2006


a) "It errors out" - what type of error are you getting? We are not
mindreaders, nor do we have access to your computer's monitor, so we can't
see what you are seeing.
 
b) Renaming databases - are you trying to duplicate an existing database?
Rename an existing database? What exactly? There are procedures to accomplish
whatever it is you want to do...
 
Cheers
Ken

________________________________

From: thelist-bounces at lists.evolt.org on behalf of Casey Crookston
Sent: Sat 8/07/2006 7:58 AM
To: thelist at lists.evolt.org
Subject: [thelist] SELECT SCOPE_IDENTITY() not working in new DB



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?





More information about the thelist mailing list