Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread how to detect server disconnection and ask user to Exit
Fri, Jun 23 2006 6:25 AMPermanent Link

"Santy Concepción"
Hi!

What is the best method to detect a C/S disconnection and close the
application without raising errors?

I want to ask the user if he wants to "wait" or "close" the application, but
if I close, it raises some errors before exiting, the application hides but
exe is still running.

I have a TApplicationEvents component "waiting" for a "# 11280" error
message (disconnected from server).
Then I do the following:

     close;
     application.terminate;

Is there a better way?

Thanks!



Fri, Jun 23 2006 1:16 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Santy,

<< What is the best method to detect a C/S disconnection and close the
application without raising errors? >>

The best way is to use the TDBISAMSession.OnRemoteReconnect event handler:

http://www.elevatesoft.com/dbisam4d5_tdbisamsession_onremotereconnect.htm

If you want DBISAM to stop asking for permission to attempt a reconnect,
just set the StopAsking paramter to True.

--
Tim Young
Elevate Software
www.elevatesoft.com

Sat, Jun 24 2006 3:17 AMPermanent Link

Abdulaziz Jasser
Hi Tim,

This works for version 4, what bout 3?
Mon, Jun 26 2006 1:22 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Abdulaziz,

<< This works for version 4, what bout 3? >>

In version 3 you simply have to eat the exceptions via the
Application.OnException global event handler.

--
Tim Young
Elevate Software
www.elevatesoft.com

Image