calling SP's

Results 1 to 2 of 2

Thread: calling SP's

  1. #1
    Join Date
    Dec 1969

    Default calling SP's

    Can i call an stored procedure within ASP code?<BR>if so how?<BR><BR>tkhs

  2. #2
    Join Date
    Dec 1969

    Default sure

    Enable your ASP page to use ADO constants<BR><BR><BR><BR>Inserting/Updating data<BR><BR><BR><BR>Here is an ADODB.RecordSet open line to run a SQL Server stored procedure to query the database:<BR><BR>Set moADOCon = Server.CreateObject("ADODB.Connection")<BR>Set moADORec = Server.CreateObject("ADODB.RecordSet")<BR><BR>sQue ry = "myproc(&#039;varchar variable&#039;," & IntVariable & ")"<BR><BR>moADOCon.Open "your connection string"<BR>moADORec.Open sQuery, moADOCon,adOpenStatic, adLockReadOnly,adCmdStoredProc<BR><BR> If moADORec.State = adStateOpen Then moADORec.Close<BR> If moADOCon.State = adStateOpen Then moADOCon.Close

Posting Permissions

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