I am trying send information to the DB and the SP will return a recordset. The problem is that I keep getting this error (ADODB.Recordse t error '800a0e78' Operation is not allowed when the object is closed). I saw a bunch of posts using queries, but none using SPs and cannot resolve the issue.
Here is a sample of the code... If more is needed let me know
[code=asp]
Dim IsRate Dim cmd
Dim rs
Set cmd = createobject("A DODB.Command")
Set rs = createobject("A DODB.RecordSet" )
with cmd
.ActiveConnecti on=gObjConnect
.CommandType=ad CmdStoredProc
.CommandText="R ateList_test"
.Parameters.App end .CreateParamete r("@ZipFrom",ad VarChar, adParamInput,6, mZipFr)
.Parameters.App end .CreateParamete r("@ZipTo", adVarChar, adParamInput,6, mZipTo)
'........
.Parameters.App end .CreateParamete r("@RateUsed" , adInteger, adParamOutput,, 0)
Set rs = cmd.Execute
IsRate = cmd.Parameters( "@RateUsed" )
response.Write rs.Status
end with
set cmd = nothing
Dim sqlCar, RScar, SFlag
SweeneyFlag = 0
if not rs.eof then '-->Fails here
[/code]
Here is a sample of the code... If more is needed let me know
[code=asp]
Dim IsRate Dim cmd
Dim rs
Set cmd = createobject("A DODB.Command")
Set rs = createobject("A DODB.RecordSet" )
with cmd
.ActiveConnecti on=gObjConnect
.CommandType=ad CmdStoredProc
.CommandText="R ateList_test"
.Parameters.App end .CreateParamete r("@ZipFrom",ad VarChar, adParamInput,6, mZipFr)
.Parameters.App end .CreateParamete r("@ZipTo", adVarChar, adParamInput,6, mZipTo)
'........
.Parameters.App end .CreateParamete r("@RateUsed" , adInteger, adParamOutput,, 0)
Set rs = cmd.Execute
IsRate = cmd.Parameters( "@RateUsed" )
response.Write rs.Status
end with
set cmd = nothing
Dim sqlCar, RScar, SFlag
SweeneyFlag = 0
if not rs.eof then '-->Fails here
[/code]
Comment