Executing a stored procedure from ASP
Hello,
I have been wrestling with this issue for two days and am quite unsure of where to go from here.
Here is a sample of my non-working code
---------
Dim spConn
Dim spComm
set spConn = Server.CreateObject("ADODB.Connection")
set spComm = Server.CreateObject("ADODB.Command")
spConn.Open "Provider=SQLOLEDB.1; Data Source=xxxgnvsql; Initial Catalog=QARepositoryTest; User Id=user1; Password=password"
spComm.ActiveConnection = spConn
spComm.CommandType = 4
spComm.CommandText = "GetWorkOrder"
spComm.Parameters.Append spComm.CreateParameter
("workorderid", adInteger, adParamInput, 4, 5347)
spComm.execute
-----------------
I receive the following error
ADODB.Command error '800a0bb9'
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
/practice/connect.asp, line 13
-------------
It is associated to the Parameter object being created. I set commandtype to 4 as I read it in one of books else I get an error for that if I set it equal to adCmdStorProc. Does anyone have any suggestions of something that I am just not seeing? Any help is greatly appreciated.
Thanks
Tamara
|