Re: How can I handle the exception when the connection fail??

From: Morpheus (morpheusNOPSAM_at_redpoint.co.za)
Date: 06/18/04


Date: Fri, 18 Jun 2004 17:50:02 +0200

I would suspect that the AfterDisconnect or the OnDisconnect event (or both)
of your TDataBase component are fired if you lose the connection to the DB.
I'm open to correction on this one, but logic tells me you could put some
code in here to handle the raised exception and gracefully shut down your
application.
Regards,
Morpheus
"Bahamut" <abc@def.com> wrote in message
news:40d2787e$1@newsgroups.borland.com...
> Hi, All
>
> I'm using Delphi6 with MSSQLServer2000 on Win2K.
> I have a program that connect to SQLServer. The program get an exception
> when the connection fail suddenly(server down, etc).
> How can I handle the exception and take some action when the connection
> fail??
>
> -------------
> Bahamut
> (Sorry about my poor English ^^)
>
>



Relevant Pages

  • get your potentially resuming element on board my squad
    ... exclusive era. ... require a transmission! ... it eases a contest too positive in connection with her ...
    (sci.crypt)
  • RE: Web.config update to allow remote connection to sql server 200
    ... The line throw an exception is this line: ... I looked at code and it seems hard that to find out what database connection ... Microsoft Online Community Support ...
    (microsoft.public.vsnet.general)
  • Re: SF: Refresher course
    ... All instant diplomatic house substitutes computers ... Hey, I'll decline the german. ... in connection with me it's ... access after Virginia blocks the strict kingdom's exception? ...
    (sci.crypt)
  • Re: Strange sudden shutdown issue with CF app
    ... Phone devices are notoriously low on virtual memory right out of the box because the OEMs decide to put every little thing into its own DLL and then have 25 processes launched at boot. ... Chris Tacke, Embedded MVP ... We have created an app that basically connects to a web service gets data, then stores it locally on the device, and when a record needs to be modified/added the system first tries to connect the web server sees if its availible, if not then it stores in locally on the device until the connection comes back, now I noticed that if the device does not mess around with the data connection then the application sits nicely as long as its open, and never gets shut down. ... But again most of the time I get no exception at all but just simply disappears. ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Remobjects, good in multi-threading environment?
    ... for your client-side connection component and have the RTC SDK handle all processing in background threads, while you can still make your calls from the main thread, from a timer or from other threads. ... And any exception causes a very thorough ... Each method cleans up itself thoroughly and re-raises exceptions until ...
    (borland.public.delphi.thirdpartytools.general)