Page 1 of 1

Lost of connection on newtwork error.

Posted: Fri 04 Jan 2008 11:10
by EderWillian
Hello friends,

I'm using dbexpsda 3.0 on a Delphi 7 client/server application.
There's only a sqlconnection that remains opened for all the program execution.

My problem is when occurs a network error, for example:
- a switch is restarted.
- a network cable is disconected and after connected.
- etc

These problems causes an error on my opened connection.
There's any component or a tip to help me to resolve this problem?

Best regards

Eder Willian

Posted: Wed 09 Jan 2008 16:04
by Antaeus
You should reconnect after your connection become broken and then recovered:

Code: Select all

  SQLConnection.Active = False;
  SQLConnection.Active = True;

Posted: Fri 03 Jul 2009 07:23
by martin
Antaeus wrote:You should reconnect after your connection become broken and then recovered:

Code: Select all

  SQLConnection.Active = False;
  SQLConnection.Active = True;
Is there a specific error code or exception class to catch and find out, that the connection is actually broken and that's not just a "regular" error like wrong sql code or other kind of exception etc.

EDatabaseError does not say much.

Posted: Fri 03 Jul 2009 13:51
by Dimon
DbxSda doesn't have such specific error, bacause the connection can be disconnected because of different reasons. Last versions of DbxSda should handle such problems.