Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating a Stored Procedure

Status
Not open for further replies.

blacktorncoat

Programmer
Dec 2, 2004
32
IL
Hello,
How do I create a Stored Procedure from another program, using COM ? what is the COM method to use, and what are the arguments?

thanks,
Y.
 
Creating a SP is nothing more than executing the proper T-SQL commands. If you know how to submit a query in the language of choice, then you can create a SP using that language.
-Karl

[red] Cursors, triggers, user-defined functions and dynamic SQL are an axis of evil![/red]
[green]Life's uncertain...eat dessert first...www.deerfieldbakery.com[/green]
 
like...

Code:
CREATE PROCEDURE ProcedureName @Variable1 datatype, @Variable2 datatype
AS
Lots of SQL statements

Then just submit that like any other query you would use, e.g. "SELECT blah FROM blah WHERE blah".

Then "ProcedureName Value1 Value2" or "EXEC ProcedureName"

-------------------------------------
• Every joy is beyond all others. The fruit we are eating is always the best fruit of all.
• It is waking that understands sleep and not sleep that understands waking. There is an ignorance of evil that comes from being young: there is a darker ignorance that comes from doing it, as men by sleeping lose the k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top