Run-time error 3706: Provider cannot be found.  It may not be properly installed.

Posted on 2011-10-12
Last Modified: 2012-05-12
Hi Everyone!

I'm having a run time error 3706 on my test machine with an application made from VB6 with SQL Server 2005 database.

Below is the connection string I am using.

Public Sub Open_Connection()
  Set con = New ADODB.Connection
  With con
    .ConnectionString = "Provider=SQLNCLI;\instance;Database=myDbase;Uid=admin; Pwd=myPword1234;"
    .CommandTimeout = 0
    .CursorLocation = adUseClient
  End With
End Sub

Open in new window

On my developer's machine there's no problem connecting.  Any ideas?

Any help is greatly appreciated.

Question by:m3mdicl
    LVL 4

    Expert Comment

    If you don't have them, you'll need to install SQL Server drivers on your test machine.

    Try this:

    .ConnectionString = "Driver={SQL Server};\instance;Database=myDbase;Uid=admin; Pwd=myPword1234;"

    Open in new window

    LVL 4

    Expert Comment


    Author Comment

    Thanks for the quick response.  

    Is there any other way or workaround not to install that drivers or MDAC on the test machines?
    Because I will deploy that app to like 20 computers.

    Is there something i can do with the connection strings?

    Or if there's no other way, is it possible to create an installer that will install that SQL drivers and MDAC automatically on the client PC?

    Let me know what you think guys.  Thank you.
    LVL 4

    Accepted Solution

    You can leave the code as is and install the SQLNCLI client on the test machine from here:

    If you get that far and still have problems make sure the Windows Firewall on the test machine doesn't get in your way to connect.

    Author Comment

    Thanks for the help guys I guess that's the only way to make it work.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Training Course: Java/J2EE and SOA

    This course will cover both core and advanced Java concepts like Database connectivity, Threads, Exception Handling, Collections, JSP, Servlets, XMLHandling, and more. You'll also learn various Java frameworks like Hibernate and Spring.

    Suggested Solutions

    Title # Comments Views Activity
    How to enforce inte 8 27
    Visual Basic Excel Formatting error 4 45
    Help with SQL joins 9 31
    Updates not working for MS Windows 7 12 79
    Article by: Martin
    Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
    In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
    As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
    Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now