Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
TSQL question
Message
De
11/08/2000 17:36:12
 
 
À
11/08/2000 14:05:06
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Divers
Thread ID:
00404063
Message ID:
00404181
Vues:
12
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform