Re: Communication Link Failure Error
- From: Tahir Sultan <TahirSultan@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 19 Oct 2006 05:45:02 -0700
The tcp/ip protocol is at the top of the list. Enabling/disabling connection
pooling did not make any difference anyway. I also try to use OLE DB instead
of using ODBC driver but it did not work.
But then I tried the following workaround which worked pretty well:
1. On disconnection from the network, in my code I changed the connection
string to use SQLOLEDB and sent a SQL query to SQL server which failed as
expected.
2. On reconnection to the network, in my code I changed the connection
string back to {SQL Server} and sent a SQL query to SQL Server which
succeeded.
I know it is not very good solution but I tested this many times and it
seemed to work.
Thanks a lot Bob for putting me in right direction.
Tahir
"Bob Barrows [MVP]" wrote:
Does the problem occur when you use the native OLE DB provider for SQL.
Server instead of the deprecated OLE DB provider for ODBC databases?
See http://www.aspfaq.com/show.asp?id=2126
Is the DSN using named pipes or tcp/ip? If it is using named pipes, try
forcing it to use tcp/ip.
Also, it is a bad idea to disable connection pooling (or session pooling as
it is known in OLE DB parlance) except in very specific circumstances. Why
have you disabled pooling?
Tahir Sultan wrote:
I am using ADO in my application to connect and retrieve data from
Microsoft SQL Server 2000 SP4. When I start my application, it
establishes connection to the server successfully and I am able to
retrieve data from the server. here is my test scenario:
1. unplug the network cable from the client machine and put the cable
back in after some time. I disconnect from the database in my code
when the client machine disconnects from the network
2. Once the client machine comes back on the network, I try to
reconnect in my code and retrieve data from the sql server but I get
the following error message when I try to execute a sql command:
[Microsoft][ODBC SQL Server Driver]Communication Link failure
This problem occurs only with Window XP SP2. With XP SP1 it works
fine. It seems to be problem on the client side as with Windows XP
SP1 I do not get this error message at all.
Here are the various details:
1. The firewall is off on the client workstation.
2. the connection string is:
driver={SQL Server};server=AA;uid=BB;pwd=CC;database=DD
where AA = DNS name of server machine where sql server is running.
BB = user name
CC = password
DD= database name
3. The client is remote to the server.
4. I can ping the server machine when the client machine reconnects
to the network.
5. I can still telnet the server when the client machine reconnects
to the network.
6. client database provider is MDAC odbc.
7. the client and server machines are in the same domain.
8. Shared memory and TCPIP protocols are enabled and TCP is at the
top of the list.
9. No alias is being used.
10. Virus scan is not installed.
11. force encription is NOT checked.
12. The connection pooling is also disabled for SQL server odbc
driver under Connection Pooling tab of ODBC Data Source Administrator.
Any thoughts would be appreciated.
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
- References:
- Re: Communication Link Failure Error
- From: Bob Barrows [MVP]
- Re: Communication Link Failure Error
- Prev by Date: Re: communications error 28415 and 32751
- Next by Date: Re: Data provider cannot be initialized
- Previous by thread: Re: Communication Link Failure Error
- Next by thread: the "where" part of the update statment
- Index(es):
Relevant Pages
|