CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 1999
    Posts
    1

    VB 5/6 runtime error 40041 (stored procedure & RDO)



    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




  2. #2
    Join Date
    Jan 1999
    Posts
    7

    Re: VB 5/6 runtime error 40041 (stored procedure & RDO)



    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




  3. #3
    Join Date
    Apr 1999
    Posts
    7

    Re: VB 5/6 runtime error 40041 (stored procedure & RDO)



    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured