Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Programatically Create a Stored Procedure...?
Message
From
17/05/2006 17:07:47
Eugenio Casal
Futura Tecnologia Informação Consult Ltd
São Paulo, Brazil
 
General information
Forum:
ASP.NET
Category:
ADO.NET
Environment versions
Environment:
VB.NET 1.1
Miscellaneous
Thread ID:
01122634
Message ID:
01123013
Views:
19
>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?


USE
GO

CREATE PROCEDURE ...
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform