Forum Discussion

amit_deshpande's avatar
amit_deshpande
Occasional Contributor
14 years ago

Error while connecting to the SQL server 2008

Hi,



I am getting the connection error while connecting to the SQL server 2008.

The connection string that I have configured is-



connectionstring="Provider=SQLOLEDB.1;Persist Security Info=False;User ID=xxx;Data Source=<<IP Address>>"



I am receiving the following error-



"connection failed because of an error in initializing provider. [DBNETLIB] [ConnectionOpen (Invalid Instance()).] Invalid connection."



Please let me know if there is anything wrong with the connection string or I am missing anything.



Thanks,



Amit Deshpande.


2 Replies

  • karkadil's avatar
    karkadil
    Valued Contributor

    It looks like you have to specify database name you connect to:


    Initial catalog=YOUR_DB_NAME;


    Another guess, you have to specify port number in your IP address, e.g.


    Data Source=xx.yy.zz.nn,ABCD


    where ABCD is a port number.