Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 using sql server stored procs with classic asp

Author  Topic 

michael999
Starting Member

9 Posts

Posted - 2012-12-29 : 10:11:16
Hi, I am struggling to get SQL Server stored procedures working with an existing (old) classic ASP website.
The site has worked for many years but it is now being hacked so I need to rewrite the SQL bits.
I am trying to use procs for the database accesses.
For example:

Dim cmdSessionProc
Set cmdSessionProc = Server.CreateObject("ADODB.Command")
cmdSessionProc.ActiveConnection = conn
cmdSessionProc.CommandText = "GetSessionDetails"
cmdSessionProc.CommandType = adCmdStoredProc
cmd.Parameters.Append cmd.CreateParameter("RetVal", adInteger, adParamReturnValue)
cmdSessionProc.Parameters.Append
cmdSessionProc.CreateParameter("SessionID", adInteger, adParamReturnValue)

cmdSessionProc("SessionID")= strSessionID
cmdSessionProc.execute

DIM xxx1=cmdSessionProc(0)
DIM xxx2=cmdSessionProc(1) etc.

------------
Any help would be appreciated.
thanks
michael
   

- Advertisement -