Error when some stored procedures are called in a classic ASP Page

R

Racer-D

When some of the SQL Server stored procedures I have written are called via
my Classic ASP page I have written I get the following error in the cell that
is supposed to be retrieving a single result:

"ADODB.Recordset error '800a0cc1'

Item cannot be found in the collection corresponding to the requested name
or ordinal.

/Default.asp, line 130"

I have no idea why this could be occuring. Some of the other stored
procedures work just fine. Any one have any ideas?

Thanks!!

dp
 
B

Bob Barrows [MVP]

Racer-D said:
When some of the SQL Server stored procedures I have written are
called via my Classic ASP page I have written I get the following
error in the cell that is supposed to be retrieving a single result:

"ADODB.Recordset error '800a0cc1'

Item cannot be found in the collection corresponding to the requested
name or ordinal.

/Default.asp, line 130"

I have no idea why this could be occuring. Some of the other stored
procedures work just fine. Any one have any ideas?

Thanks!!

dp

You probably are getting spurious resultsets containing "x records affected"
messages. You can suppress these messages by adding
SET NOCOUNT ON
to the beginning of your stored procedures.

If that does not solve it, you should show us some code.

Bob Barrows
 
R

Racer-D

I changed the proc to return named columns in brackets to see if that would
help. Still nothing.

On a separate effort, I changed the SELECTS to PRINT statements.. Still no
change. I still get the following error:


ADODB.Recordset error '800a0cc1'

Item cannot be found in the collection corresponding to the requested name
or ordinal.

/Default.asp, line 130
 
B

Bob Barrows [MVP]

There is nothing there that should cause that error, so it stands to reason
that the error is occurring elsewhere.

Why aren't you checking for an empty recordset?

<td> <%strSQL1 = "exec proc_dba_jobhistory"
Set rs = aursql01.execute(strSQL1)
if not rs.EOF the
Response.Write rs(0)
else
Response.Write "nothing returned"
end if
%>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top