Link to home
Start Free TrialLog in
Avatar of alc
alc

asked on

ODBC Connection Failed

I have an ISP who is currently hosting a MS-SQL database for me on the Internet. I have been able to connect to the database through an ODBC connection on a Windows NT workstation.

Now I am trying to connect to that same database from several other computers and on each computer I get the error message - "Connection failed: SQLState: '01000' SQL Server Error: 53 [Microsoft][ODBC SQL Sever Driver][dpnmpntw]Connection Open (CreateFile()). Connection failed: SQLState: '08001' SQL Server Error: 53 [Microsoft][ODBC SQL Sever Driver][dpnmpntw]Connection Open (CreateFile())." And I cannot get a successfull connection to the database.

On each computer, including the one that works, I am using a dial-up connection to the Internet. On each computer I can successfully ping the SQL Server, before trying to connect with ODBC. And on each computer I am using Microsoft Access to try and link the tables from the database.

Is there some piece of the setup that I am missing on the other computers? Does my ISP need to make a configuration change on their SQL Server to accomodate connections from these other computers? I am not sure what else to try.
Avatar of sivabalan
sivabalan

Hi,
I think this is because of the ODBC connections that are left open and are not disconnected. One thing you can do is try freeing all the open connections(say by restarting the server) or you can increase the number of user connections in the server manager window of the SQL Server Enterprise Manager. From next time be sure to close an ODBC connection once the operation is over. Hope this helps.
Avatar of alc

ASKER

This doesn't explain why I could get an ODBC connection on one machine and not another.
Hi,
Maybe the connection from that particular m/c may be already open due to which it connects from that m/c. You can check this out by restarting the server. If I had wrongly understood the scenario please do throw some light on it.
Do you set a system DSN in the ODBC manager on the other
machines (which dont work) ? Compare these settings with the
working machine.

Avatar of alc

ASKER

sivabalan, I will have to get my ISP to restart the server in order to try this out since the server is not within my control. But I only connect to the server occasionally. If for some reason I had not closed the connection from the working machine wouldn't the connection time out after a period of time?

egono, Yes I have set all the DSN's up as system DSN's. I have checked all of them several times and I cannot find any difference between the working one and the one's that don't work.

Something else that I have tried is to logon locally to the machine that is working and try connecting. This way my domain is now the local machine rather than the network. I found that I received same error message that I got on all the other machines. It would seem that the perhaps the domain is causing the connection problem.
When you setup a connection with a MS-SQL server you need to setup the protocol to connect to the server. On the Client, you are able to setup a protocol as TCPIP or named pipes.
Use TCPIP if possible or set your workstation to use trusted connections.
Then your ODBC driver will connect to the remote server using the protocol you defined.
Good Luck
you can also use ODBCPING.EXE to check your connection to the sql server.
Avatar of alc

ASKER

Well I finally got the problem solved by calling Microsoft Tech. Support. Perezjos had the right idea. I was using the default network library which was named pipes, but that protocol is not very reliable over a TCP/IP WAN like the Internet. Instead I needed to use the sockets library dbmssocn.dll. Thanks for your help.
Avatar of alc

ASKER

I will award the points to perezjos.
Thank you
thank you
Avatar of alc

ASKER

Perezjos, I think you need to submit an answer message in order for me to grade your message.
ASKER CERTIFIED SOLUTION
Avatar of perezjos
perezjos
Flag of New Zealand image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial