Please on help recordset can't open
I am begnnier of writing ASP and have following error.
The error message is
"Operation is not allowed when the object is closed."
I guess the record is not yet opened, Could anyone tell me how can I open it?
Sorry for bad English, from HK...
Thank you in advance.
I attach my code as follow:
Dim objRS, objcomm, objparam, strdirector
set objcomm = server.CreateObject ("ADODB.Command")
objcomm.ActiveConnection = strconnect
objcomm.CommandText ="getuserinfo"
objcomm.CommandType = adcmdstoredproc
set objparam = objcomm.CreateParameter ("@pcstyl",adChar,adparaminput,50)
objcomm.Parameters.append objparam
strdirector ="peter"
objcomm.Parameters ("@user") = strdirector
set objrs = objcomm.Execute
set objcomm =nothing
set objparam = nothing
while not objrs.eof
Response.Write objrs ("user") & objrs ("address")
objrs.movenext
wend
objrs.close
set objrs=nothing
|