Re: Reconnect does not work TADOconnection



Thanks Steve. 'ping' sounds like a good idea - I'll try it.

Funny thing for us is we have had this application on SQL2000 for 4 years
(400 users) and 1 or 2 of these drops per week. We upgraded the servers (to
Core2 x 2, SAN, SQL2005, 64bit W2K3) and we get about 100 per day (out of
400 users). Some users are remote over T1 so they are really hot when they
have to restart the app (load time is 90 seconds over T1). [We are porting
to Web now]

On your timed ping, how often are you pinging the server to keep it active?
What kind of 'ping'? Just any simple short Select to do something?

Thanks,
Ron



"Steve Zimmelman" <skz@xxxxxxxxxxxxxxxxxx> wrote in message
news:47cc21a6$1@xxxxxxxxxxxxxxxxxxxxxxxxx
Hi Ron,

We've dealt with similar issues using ADO and SQL Server. When the
connection from SQL is dropped, the ADOConnection remains active until you
attempt to read or write using it. You may already know this, but when
you close the connection it also closes any open ADOdataset's that are
bound to that connection. So you'll need open and reestablish all the
datasets.

I don't know if stopping the SQL service is a fair test though. In our
experience, the connection is usually dropped due to inactivity. But we
were never able to figure out why, or how much inactivity caused SQL to
drop the connection. We ended up subclassing the TAdoConnection and added
a timed "ping" to server. This solved 99% of the dropped connection
errors that were plaguing us.

HTH,
-Steve-


"Ron J" <rjohnson@xxxxxxxxxxxx> wrote in message
news:47c75343$1@xxxxxxxxxxxxxxxxxxxxxxxxx
Trying to handle network errors or communication errors returned to our
TADOconnection. Using an exception handler something like this:

if (E.message = 'communication link failure') then
begin
Conn1.Close;
conn1.open;
end;

To get the error I just turn off SQL server service and try to do a write
in the applicaton. The interesting thing is when the error happens the
connection is still open, so I force a close, then re open it. However,
at that point (with SQL server turned back on), the application does not
recover. It keeps getting the exception and DB operations do not work.

Any ideas?





.



Relevant Pages

  • Re: ODBC lost connections
    ... if you are trying to connect to sql server over internet or wan - then this is a problem. ... Even ping can show persistent connection - it is not, any drop of connection cause "Lost connection" error message ... network to help pinpoint where the issue may be. ...
    (microsoft.public.access.modulesdaovba)
  • Re: Reconnect does not work TADOconnection
    ... On your timed ping, how often are you pinging the server to keep it ... We've dealt with similar issues using ADO and SQL Server. ... connection from SQL is dropped, ... Using an exception handler something like this: ...
    (borland.public.delphi.database.ado)
  • Re: Reconnect does not work TADOconnection
    ... We've dealt with similar issues using ADO and SQL Server. ... close the connection it also closes any open ADOdataset's that are bound to ... TADOconnection. ... Using an exception handler something like this: ...
    (borland.public.delphi.database.ado)
  • Re: sqlx2008 basic configuration task
    ... I can ping honeycomb ok, but I get no response from "ping honeycomb\hive', as it could not find host. ... I learned about the sqlcmd utility, and it seems I can just type sqlcmd to see if the utility runs at all. ... Could not open a connection to SQL Server. ...
    (microsoft.public.sqlserver.setup)
  • Re: Wireless problem
    ... WRT Avila Market, I am told that I am one of 2-3 people who ... thinking less and less that the problem might be with the hotspot. ... Ethernet adapter Local Area Connection: ... Ping to DNS: ...
    (microsoft.public.windowsxp.network_web)