문제

I was able to connect to remote SQL server through SQLDMO residing my hosting server. There was no issue. Now as I've Just switched to the new hosting provider, I can connect to the database server through SQL server management studio but SQLDMO I cannot connect anymore.

Here is my VB.NET code:

    Dim oServer as New SQLDMO.SQLServer2
    oServer.EnableBcp = True
    oServer.Connect(pServer, pUserName, pPassword)

At third line an error pops up saying:

"[Microsoft][ODBC SQL Server Driver][DBNETLIB]Invalid connection. [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Invalid Instance())."

도움이 되었습니까?

해결책

You will need to check if you are using correct Data Source name in your connection string. If you are using localhost then try to use IP address of server. If you have SQL server with the Instance then use instance name with the server Ip in your connection string.

http://forums.esds.co.in/f4/dbnetlib-connectionopen-invalid-instance-invalid-connection-4139/

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top