Results 1 to 7 of 7

Thread: error messages

  1. #1
    scoutt
    Guest

    error messages

    I made a simple program for my mom and she installed it no problem and ran it with no problems. now I gave it to my sister and she ran it with no problems. both on win98se. but I gave it to my boss and she ran it on the work computer (win2000) and it runs ok. but when she click on a menu item to open another form she gets an error. the error states

    Run-time error '-2147220999 (800401f9)':
    Method '~' of object '~' failed.

    I included most things in the package when I ran package and development on my vb6. all that form is is a listview that opens a database. it uses jet so I included those dlls and ocx or what ever it takes. so she took it home to her computer (win98se) and installed it and ran it and click on the same menu item and gets another error different from win2k. it reads as follows

    class doesn't support automation or expected interface. also it was a run-time error. don't know the numbers.

    does anybody have an idea or a source that shows what each error code it or how to fix it.

    TIA

  2. #2
    Fanatic Member rudvs2's Avatar
    Join Date
    Mar 2001
    Location
    NZ
    Posts
    935
    the errors that you are getting are caused by the ado or dao dlls that are being used

    What version of the MDAC did you develop this app with?

    I would suggest that you get your boss to download the latest mdac 2.6 sp1 from this link http://www.microsoft.com/data/download.htm install it and run the application

    This is the fun and games of MDAC

  3. #3
    Fanatic Member rudvs2's Avatar
    Join Date
    Mar 2001
    Location
    NZ
    Posts
    935
    ps your error was generated by winerror.h and the actaul error message that is associated with that error number is this

    -2147220999 (800401F9) Error in the DLL

    to actually get vb to decipher the correct error ddescription you need to use the format message api

    Format Message API

    VB Code:
    1. Option Explicit
    2.  
    3.    Const FORMAT_MESSAGE_FROM_SYSTEM = &H1000
    4.  
    5.    Private Declare Function FormatMessage Lib "kernel32" Alias _
    6.       "FormatMessageA" ( ByVal dwFlags As Long, lpSource As Long, _
    7.       ByVal dwMessageId As Long, ByVal dwLanguageId As Long, _
    8.       ByVal lpBuffer As String, ByVal nSize As Long, Arguments As Any) _
    9.       As Long
    10.  
    11.    Private Function MessageText(lCode As Long) As String
    12.        Dim sRtrnCode As String
    13.        Dim lRet As Long
    14.  
    15.        sRtrnCode = Space$(256)
    16.        lRet = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, 0&, lCode, 0&, _
    17.                  sRtrnCode, 256&, 0&)
    18.        If lRet >0 Then
    19.           MessageText = Left(sRtrnCode, lRet)
    20.        Else
    21.           MessageText = "Error not found."
    22.        End If
    23.  
    24.    End Function

    hope this has been helpful to you

  4. #4
    scoutt
    Guest
    thank you rudvs2, tha thas been a big help. she had that file but i think it was out of date. I am not sure what version it was.

    again thanks for the help.

    oh by the way I used Mdac_typ ver. 2.50.4403.12

  5. #5
    scoutt
    Guest
    actually how do I make it so that function gets used when there is an error. do I do something like

    on error MessageText


    or something similiar. forgive me as I act stupid here. maybe it is brain farts.

  6. #6
    -= B u g S l a y e r =- peet's Avatar
    Join Date
    Aug 2000
    Posts
    9,629
    something like this:

    VB Code:
    1. Private Sub Command1_Click()
    2.     On Error GoTo xit
    3.     'ur code
    4.     '
    5.     '
    6.     Exit Sub
    7. xit:
    8.     MessageText (Err.Number)
    9. End Sub
    -= a peet post =-

  7. #7
    scoutt
    Guest
    thanks Peet, I will give that a go.

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