Results 1 to 4 of 4

Thread: A strange bug to fix

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2000
    Location
    BC, Canada
    Posts
    142
    Here is the code I used for processing an ADO recordset
    Code:
      Dim member As Field
    
     For Each member In myRst.Fields           
    
            Msgbox member.Name
    
            'more code goes here                      
      Next member
    The rountine is used in my program for long time without problem. But after I add/remove some Reference library files a couple of times, I got an error message on member.Name: "Method or data member is not found"

    When typing "." after "member", the auto-list-member list box display has different list options which has no "Name" option. when I tries to retype "Dim member as Field" line, The auto-list-member list box for types available has two lines with same name "Field". If I remove "Microsoft ActiveX Data Object 2.1 library" reference, no more double "Field" type line. Also, a early version of the same program still works fine.

    Somehow I got a reference registry problem under VB IDE, but I have no idea what happened and how to fix it

    Thanks very much for any help.




  2. #2

    Talking

    The same thing happend to me. I reinstalled VB and the code is working fine. You better install Visual studio Service Pack 4
    Madhusudana Gorthi [email protected]
    Senior Software Engineer
    www.stgil.com

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jan 2000
    Location
    BC, Canada
    Posts
    142
    Thx for response. I'll update to SP4 soon.

    But I have found more clues, in case someone is still intersted in solving the puzzle. The problem I mentioned early came only after I tried to change "Microsoft ActiveX Data Objects 2.1 Library" to Either "ActiveX Data Object 2.5 Library" or "ActiveX Data Object 2.0 Library". Once error happened once, the program will get the same error no matter which library file is chosen.

    To me, this type library is not registered correctly. what could be wrong?

  4. #4
    old fart Frans C's Avatar
    Join Date
    Oct 1999
    Location
    the Netherlands
    Posts
    2,926
    Did you try:
    Dim member As ADODB.Field


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