Hi,
why oh why does the following (as run from query analyzer) not work?
Execute('use MyDataBase')
it seems to flash for a millisecond and then ends up on the same database as I started?
plain old - 'use MyDataBase'- of course - works fine.
This is actually part of a larger problem I'm trying to store the current database in a variable - change databases and do some stuff -
and then switch back to the original database. I won't know what the original database is so I'm using - @myvar = db_name(db_id()) - which pulls it fine - but I can't get code to set it back!?!?!
What is the best way too handle this?
Thanks!
Ken B. Matson
GCom2 Solutions