The error mainly comes due to wrong spelling of ordinal
like rscode("result") instead of rscode("result_text")
But while using procedures it ususally comes
I used following statement in ASP
set conn=server.CreateObject ("adodb.connection")
strConnString=Session("strConnectString")
conn.Open strConnString
strsql = "exec sp_check_Upload_PL '" & strInvNum & "'"
set rscode = conn.execute(strsql)
When, I tried to print result like
response.Write(rsCode(0)),
It resulted in error "Item cannot be found in the collection corresponding to the requested name or ordinal".
Also, the recordset is not opened.
The problem can be solved by using
set nocount on
in the procedure.
The Statement stops the message that shows the count of the number of rows affected by a Transact-SQL statement or stored procedure from being returned.
0 comments:
Post a Comment