Results 1 to 8 of 8

Thread: VB6 Application and SQL Express 2012 connection: Provider cannot be found

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jun 2015
    Posts
    16

    VB6 Application and SQL Express 2012 connection: Provider cannot be found

    I have an VB6 application developed on a 32-bit Windows XP machine that connected to a SQL Server Express 2005. The organization upgraded their workstations to 64-bit Windows 7 and their database application to SQL Server 2012.

    To help me troubleshoot problems encountered, I built a development machine and installed VB6 Enterprise and SQL Server Express 2012. I have been successful in opening and compiling the VB6 application developed on the XP machine error free. When I try to execute the application, I receive the following error:
    Name:  VB6ConnectionError.gif
Views: 2860
Size:  4.8 KB

    I am using the following connection parameter: Private adoConnection As ADODB.Connection
    My connection string is: "Provider=SQLNCLI11.1;Data Source=Computer\SQLExpress;Initial Catalog=RELIANT;Integrated Security=SSPI;Persist Security Info=False;User ID='';Initial File Name='';Server SPN='';Trusted_Connection=YES" [to test the connection string, I created a brand new VB6 project and was able to successfully connect to the database via an ADO controls]

    When I use the same connection string in the application from the Windows XP machine, it bombs with error attached to this post. I have searched this forum and Internet hoping to find an answer to this particular connection issue, but nothing specific to my situation. I think it has something to do with either a reference not being enabled in the application or the application is not being executed in 32-bit mode.

    If someone could point in the right direction, I would appreciate it.

  2. #2
    Fanatic Member
    Join Date
    Apr 2015
    Location
    Finland
    Posts
    679

    Re: VB6 Application and SQL Express 2012 connection: Provider cannot be found

    'Provider not found' error, means that SQL Server native client is not installed to your XP machine or you use wrong version in Provider verb part.

    For example, SQL Server Native Client version 10.0 would be;

    Conn = "Provider=SQLNCLI10;Data Source=tcp:" & sServer & ",1433;Initial Catalog=" & dBase & ";Application Name=" & App.EXEName & ";Trusted_Connection=Yes;" 'Encrypt=no;"

    So if you have version 11.1 installed, try with SQLNCLI11 (without .1 subversion).

    ...and if you are using integrated security, remove the User ID part.
    Last edited by Tech99; Jun 26th, 2015 at 05:50 PM. Reason: clarified bit...

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Jun 2015
    Posts
    16

    Re: VB6 Application and SQL Express 2012 connection: Provider cannot be found

    Thanks for the response. I removed the .1 subversion and removed the User ID from the connection string. The still received same error error was still the same "Provider cannot be found".

    Here is the connection string that is returned: "Provider=SQLNCLI11;Data Source=ARCDEV\SQLExpress;Initial Catalog=RELIANT;Integrated Security=SSPI;Persist Security Info=False;Initial File Name='';Server SPN='';Trusted_Connection=YES"

    Since the SQL 2012 Server Express is installed on the same machine that I am executing the VB6 application, I checked and the driver is installed.

    Do you have any additional suggestions?

  4. #4
    gibra
    Guest

    Re: VB6 Application and SQL Express 2012 connection: Provider cannot be found

    SQL Server connection strings - ConnectionStrings.com
    http://www.connectionstrings.com/sql-server/

    there are many sample for Express version.

  5. #5
    Fanatic Member
    Join Date
    Apr 2015
    Location
    Finland
    Posts
    679

    Re: VB6 Application and SQL Express 2012 connection: Provider cannot be found

    Quote Originally Posted by DebbieH View Post
    Since the SQL 2012 Server Express is installed on the same machine that I am executing the VB6 application, I checked and the driver is installed.

    Do you have any additional suggestions?
    Check that the driver is 32-bit version, by running

    C:\Windows\SysWOW64\odbcad32.exe
    -> System DSN -> Add -> and look is there SQL Server Native Client 11 listed in drivers listing.

  6. #6

    Thread Starter
    Junior Member
    Join Date
    Jun 2015
    Posts
    16

    Re: VB6 Application and SQL Express 2012 connection: Provider cannot be found

    Thanks everyone for their responses. This is a fairly large application the several forms forms containing connection strings. Once I changed all of the connection strings to read the SQL Native Client 11, I no longer received the "Provider cannot be found". If there was any reference to the older native SQL client, the application would not load.
    Last edited by DebbieH; Jul 13th, 2015 at 12:21 PM.

  7. #7
    Super Moderator FunkyDexter's Avatar
    Join Date
    Apr 2005
    Location
    An obscure body in the SK system. The inhabitants call it Earth
    Posts
    7,900

    Re: VB6 Application and SQL Express 2012 connection: Provider cannot be found

    I've deleted a few posts because they were off-topic. They didn't appear to be offensive or trolling but I would ask folks to keep posts on topic in the main forums.

    Thanks
    FD
    The best argument against democracy is a five minute conversation with the average voter - Winston Churchill

    Hadoop actually sounds more like the way they greet each other in Yorkshire - Inferrd

  8. #8
    Frenzied Member
    Join Date
    Jan 2010
    Posts
    1,103

    Re: VB6 Application and SQL Express 2012 connection: Provider cannot be found

    Quote Originally Posted by FunkyDexter View Post
    I've deleted a few posts because they were off-topic. They didn't appear to be offensive or trolling but I would ask folks to keep posts on topic in the main forums.

    Thanks
    FD
    Thanks for removal. I am sorry!

Tags for this Thread

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