Runtime error message IM006:

we developed an .exe application(vb6.0 and Oracle8.0).
 While running this .exe application on Windows NT4.0 and database server (which r on the same machine) we r getting this run time error as:
           RUNTIME ERROR - 40002
       IM006 [Microsoft][ODBCDriverManager]
       Drivers SQL SetConnectAttr failed.
 Note: when we run .exe application on another WIN NT4.0 or Win95 where the database server is on the other machine, then it is working perfectly.

                       Please reply to this as early as possible.
       Thanking u.
Who is Participating?
Éric MoreauConnect With a Mentor Senior .Net ConsultantCommented:
Depending on your data access mechanism, you will have something like the following.

For DAO/ODBC Direct and RDO:
    With rdoErrors
        For lngI = 0 To .Count - 1
            With .Item(lngI)
                MsgBox .Number & vbCrLf & .Description
            End With
        Next lngI
    End With

For ADO:
Dim X AS ADODB.Error
For each X in YourConnection.Errors
    MsgBox x.Number & vbcrlf & x.description
Éric MoreauSenior .Net ConsultantCommented:
I suspect your ODBC-DSN not be as it would be!

Which data access method do you use? Depending on the data access mechanism you use, you have an error collection (rdoErrors fo examples) which will give you another more explicit message!
Can you post the code?
This question was awarded, but never cleared due to the JSP-500 errors of that time.  It was "stuck" against userID -1 versus the intended expert whom you awarded.  This corrects the problem and the expert will now receive these points; points verified.

Please click on your Member Profile and select "View Question History" to navigate through any open or locked questions you may have to update and finalize them.

This is the Community Support link, if help is needed, along with the link to All Topics since many new ones were recently added.
Moderator @ Experts Exchange
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.