• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 401
  • Last Modified:

Erratic Oracle Database connection via vb program problem

I have written a vb6 SP5 program that connects to an Oracle database via the following code

cnOrcl.ConnectionString = "Provider=MSDAORA.1;Data Source=" + sOracleDataSource + "; " & _
        "User ID=" + sOracleUserID + ";Password=" + sOraclePassword + ";"
Screen.MousePointer = vbHourglass
On Error Resume Next '
If Err.Number <> 0 Then
    MsgBox "Error connecting to Oracle database  -   error   = " + CStr(Err.Number) + " - " + Err.Description, vbCritical, "Error"
     Screen.MousePointer = vbDefault
     Exit Sub
End If

The program works on most pc's but I know of at least 2 where this connection doesn't work and I get the following error:

Error connectiong to Oracle database - error - 3706 - Provider cannot be found. It may not be properly installed.

Now I have had IT reinstall all the odbc drivers.  I can connect to the database from Access and Excel using the odbc connection.  I have tried registering the msdaora.dll.  Frankly I have tried lots of different things over a period of about a day and am now flumoxed.

Does anyone have any ideas of what I could try next?


  • 2
1 Solution
1) Did you create a setup program and distribute that way?
2) Re-install the MDAC version you are using on their machine
3) Check the DSN to make sure it is properly set

NiallMooreAuthor Commented:
1.  Yes I did create a setup program which appears to have done its job properly.
2. I got the IT department to reinstall MDAC.  I have checked that it is the same version that I used.
3.  The DSN id fine.  I have used it to connect to the database via Aceess and Excel.

This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Post your closing recommendations!  No comment means you don't care.

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now