I currently have several SQL procedures on an SQL server, I would like to know if its possible to execute these from an asp script and how I would go about doing so?<br><br>Grateful for any help, thanks.
This should allow you to use a stored procedure. This example uses a paramter intassociateID to use a Stored PRoc without a paramter just omit ('" & intAssociateID & "') from the recordset open statment.<br><br><br>dim conntemp,rstCredits,intAssociateID,arstIncident,arstBenefitDays<br> <br>set conntemp=server.createobject("adodb.connection"<br>conntemp.open "Provider=SQLOLEDB; Data Source=yourserver; Initial Catalog=yourdatabase;User ID=xxxx;Password=xxxx"<br> <br>intAssociateID = request.QueryString("ID"<br> <br>set arstCredits=server.createobject("adodb.recordset"<br> <br>arstCredits.open"sp_get_CreditBalance('" & intAssociateID & "')",conntemp_<br>,adOpenStatic,adLockOptimistic,adcmdStoredProc
I'm a bit new to this stuff, could u plz simplify this if possible. Heres a snippet of my code if it helps to explain.<br><br>--------------------------------------------------<br>StrQuery = "Select * from Customer Order by CustId"<br>Set allcust = Server.CreateObject ("ADODB.Recordset"<br>allcust.Open StrQuery ,"DSN=Architron; UID=sa; PWD="<br>--------------------------------------------------<br><br>Lets say my stored procedure was called findCustomer how would I execute this on my database/recordset?<br>
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.