Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 Item cannot be found in the collection - Error

Author  Topic 

Nitu
Yak Posting Veteran

81 Posts

Posted - 2006-03-08 : 14:10:25
I am getting this error:


ADODB.Recordset error '800a0cc1'

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

/busmgmt/bma_dev/ScidRequestUpdate.asp, line 71

line 71 is "response.write rs("errorCount")"


when i run this following code:



-------------------------------------
stored procedure
------------------------------------
create spupdaterecords
@input1 int
as
Declare @errorCount
begin tran

Set @errorCount = 0

if @input1 = 1
update table set field = 0
else
update table set field = -1

if @@error <> 0
Begin
rollback tran
Set @errorCount = @@error
End

select @errorCount

Commit tran
Go

------------------------------------------------
asp
------------------------------------------------

set rs = createobject("adodb.recordset")
sql = "spupdaterecords 1"
rs.open sql, conn

response.write rs("errorCount")





Can someone please tell me where iam wrong.


Thanks in advance,
Nitu

Nitu
Yak Posting Veteran

81 Posts

Posted - 2006-03-08 : 14:11:29
sorry wrong page!!
Go to Top of Page

RickD
Slow But Sure Yak Herding Master

3608 Posts

Posted - 2006-03-09 : 07:32:18
That's ok, but if you want to know what the problem is with it, it is the fact that you will have 2 recordsets being returned from that stored proc. Also, errorCount will not have a field name as you haven't set one..

try:


select @errorCount as errorCount
Go to Top of Page
   

- Advertisement -