Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Programatically Create a Stored Procedure...?
Message
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Versions des environnements
Environment:
VB.NET 1.1
Divers
Thread ID:
01122634
Message ID:
01122635
Vues:
18
This message has been marked as the solution to the initial question of the thread.
>I am trying to create a Stored Procedure in a specified database programatically using the ExecuteNonQuery() method of an SQLCommand object. I am coming across a problem where the SP is being created in the Master Database because the "sa" account is being used. I attempted to preface my Create Procedure command with "USE ;" but SQL spits back that the Create Procedure command must be the first statement executed in a batch. How can I tell SQL to create this SP in the proper database?

I am not very familiar with NET, but in VFP I use folowing technics: make a new connection to desired DataBase and then ExecuteNonQuery("CREATE SP......")
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform