>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.
Ken,
From Books Online, on EXECUTE:
Changes in database context last only until the end of the EXECUTE statement. For example, after the EXEC in this example, the database context is master:
USE master EXEC ("USE pubs") SELECT * FROM authors
Sylvain Demers