Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Running SQL Scripts
Message
De
14/03/2003 12:55:38
 
 
À
14/03/2003 11:16:46
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Divers
Thread ID:
00765898
Message ID:
00765948
Vues:
15
GO is not a keyword recognized by SQL Server. AFAIK, Query Analyzer and OSQL/ISQL are the only tools that recognize it. You'd have to experiment with SQL-DMO.

If you want to use the SqlClient, you'll have to parse the script and break it into multiple batches yourself.

-Mike

>Hi, everybody.
>
>Is there any way to run SQL scripts in .NET? The detail is that the scripts has several transactions (GOs spreaded all over the thing...)...
>
>I know that I could:
>
>a. Use SQLDMO
>b. Parse the string and execute each block at a time
>
>but I think it shall have some way to execute it all at once...
>
>TIA
Michael Levy
MCSD, MCDBA
ma_levy@hotmail.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform