Remote SQL Server Database Connection Problem using VB6 using OLEDB

Discussion in 'SQL Server' started by ksenthilbabu, Sep 22, 2009.

  1. ksenthilbabu

    ksenthilbabu New Member

    Joined:
    Aug 20, 2009
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    0
    Please Help me,

    We had a Software application Developed using VB6 with MSSQL SERVER2005 as Database(Remote)provided by our web space provider , the application was working properly until they upgraded the Server configuration, Now we are not able to connect with the database using the normal OLEDB connection String

    Code:
    adoConn.Open PROVIDER=MSDataShape;Data Provider=SQLOLEDB.1;Persist Security Info=0;User ID=UserName;Password=Password;Initial Catalog=DatabaseName;Data Source=servername
    
    It is giving an ERROR (Error No.-2147467259 at Line No. 0 ([DBNETLIB][ConnectionOpen (Invalid Instance()).]Invalid connection.) in procedure )

    We contacted our service providers they informed that they asked us to try with the SQL Server Instance

    Code:
    adoConn.Open PROVIDER=MSDataShape;Data Provider=SQLOLEDB.1;Persist Security Info=0;User ID=UserName;Password=Password;Initial Catalog=DatabaseName;Data Source=servername/instancename
    It is giving an ERROR (Error No.-2147467259 at Line No. 0 ([DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.) in procedure)

    Again they informed to use the ip address instead of servername without the named instance and also with the named instance,but the same errors are generating.

    WE TRIED WITH SQL NATIVE CLIENT : -

    With Instance Name:

    Code:
    adoConn.Open PROVIDER=MSDataShape;Data Provider=SQLNCLI.1;Persist Security Info=0;User ID=UserName;Password=Password;Initial Catalog=DatabaseName;Data Source=servername/Insancename
    
    Error No.-2147467259 at Line No. 0 (Named Pipes Provider: Could not open a connection to SQL Server [53]. ) in procedure Command1_Click of Form Form1


    WithOut Instance Name:

    Code:
    adoConn.Open PROVIDER=MSDataShape;Data Provider=SQLNCLI.1;Persist Security Info=0;User ID=UserName;Password=Password;Initial Catalog=DatabaseName;Data Source=servername
    IT IS WORKING PROPERLY.


    The Web Service Provider came online using Team Viewer worked directly in our machine and tried the connection string
    Code:
    adoConn.Open PROVIDER=MSDataShape;Data Provider=SQLOLEDB.1;Persist Security Info=0;User ID=UserName;Password=Password;Initial Catalog=DatabaseName;Data Source=servername/instancename
    using Microsoft Data Link Provider It is not working and generating Errors.

    When they tried in their system with the same connection string using Microsoft Data Link Provider it is connecting with the database without any problems. ( We also viewed through Team Viewer their system)

    Please help us to solve this connection problem using OLEDB, because when we use SQL NATIVE CLIENT we will not be able to connect using Crystal Reports 10 because CR10 will not support SQL NATIVE CLIENT.
    REWRITING THE ENTIRE APPLICATION TO USE SQL NATIVE CLIENT IS VERY DIFFICULT.

    Please help us..

    With Thanks,
    K.Senthil Babu
     
  2. urstop

    urstop New Member

    Joined:
    Oct 17, 2007
    Messages:
    84
    Likes Received:
    0
    Trophy Points:
    0
    It looks like your hosting provider as configured the default instance correctly, but the named instance is having problems. It has its security permissions set to not accept remote database connections or something. They can still access it from their server as they are local to it.

    They will have to enable remote connections for this named instance of SQL Server.
     
  3. ksenthilbabu

    ksenthilbabu New Member

    Joined:
    Aug 20, 2009
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    0
    Thanks UrStop,
    I had solved the problem, it is the port they have changed.

    Again thanksfor your reply.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice