Click to See Complete Forum and Search --> : VB 5/6 runtime error 40041 (stored procedure & RDO)


Hiten Negandhi
January 19th, 1999, 12:38 PM
Hi all,

I have an application where I am trying to access an Oracle stored

procedure.

I get this runtime error message:


Runtime error '40041':

Object Collection: Couldn't find item indicated by text.


Here is a part of my code:

'

Dim qryCheckBatch As New rdoQuery

Dim rsCheckBatch As rdoResultset


Set qryCheckBatch = Cn.CreateQuery("CheckBatch", "{ ? = Call

dps_point_of_sale.is_batch_summarized (?) }")

Error -->qryCheckBatch(0).Direction = rdParamReturnValue

qryCheckBatch(1) = Val(lblBackoutBatchID.Caption)

Set rsCheckBatch = qryCheckBatch.OpenResultset(rdOpenForwardOnly,

rdConcurReadOnly)

'

Cn is defined in SubMain() as public rdoConnection.


The surprising part is that this exact code worked for me earlier without

any problems. My friend was trying to do a similar thing and he used to get

this error. I had recently upgraded to VB 6.0 and I got this error. I

installed 5.0 again, but now I am stuck with this error.


Did anyone have this problem or knows a solution or alternate method /

workaround?

Any help will be highly appreciated, thanks!


Hiten

N.G.Bimlesh
January 25th, 1999, 12:17 PM
Hi,

This error usually occurs when you are trying to access an item of the collection when it is not present.


1.You may be trying to retreive data for a field, for which the field is not present in your query at all.

2.Be sure, that you are trying to access only the fields that you have defined in the query.

3.Verify the Field names that you are trying to access.

4.Check whether the index that ur trying to access is a valid index in the RDO collection.


Hope I have given some meaningfull information.


Regards

Bimlesh

Wolfgang Kutschera
February 8th, 1999, 06:38 AM
Consider another thing:

RDO delivered with VB6 has a few bugs! Most of them should be corrected with Service Pack 2 but there could be the one or other remaining...


brgds

Wolfgang "Rick" Kutschera

Scientific Games Austria

Systemprogramming