Stored Procedure

Results 1 to 2 of 2

Thread: Stored Procedure

  1. #1
    Join Date
    Dec 1969

    Default Stored Procedure

    I'm using MS SQLSERVER as my dbase and using ASP to build my web application. I have no problem accessing the database, but how is the easiest and best way to call on a stored procedure? What is the syntax?

  2. #2
    Join Date
    Dec 1969

    Default easiest and best maybe not same... least not necessarily.<BR><BR>The *best* way is to use a COMMAND object, create parameters with specific types, and invoke the SP by name.<BR><BR>The easiest way is to just use a CONNECTION object to EXECUTE the SP, passing the arguments as string, in line.<BR><BR>&#060;%<BR>Set conn = Server.CreateObject("ADODB.Connection")<BR>conn.Ex ecute "MySP 13,&#039;whatever&#039;,&#039;3/11/2003&#039; "<BR>%&#062;<BR><BR>Ummmm....I might need to make that<BR>&#060;%<BR>Set conn = Server.CreateObject("ADODB.Connection")<BR>conn.Ex ecute "EXEC MySP 13,&#039;whatever&#039;,&#039;3/11/2003&#039; "<BR>%&#062;<BR><BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts