Page 1 of 1

Any Network Connection problem to affect msconnection

Posted: Sat 26 Jan 2008 15:52
by aytaral
Hi.
I'm licenced user of SDAC.
After connection is lost due to any of network problems,
I get an error from MsConnection object,
while the code in a timer object is running.

The Code in timer object must run, if pc is connected.
But if connection is lost, MSConnection must try to connect.

To do this i used code below, but it doesn't work.

-----------------------------------------------------
FormCreate :
Msconnection1.Connect;


Timer1Timer:

if msconnection1.connected then
begin
......
......
.........
.............
end else msconnection1.connect;
------------------------------------------------------
What is the solution of this problem?
Does the timeout event cause this problem?
What should i do?

Regards.

Posted: Mon 28 Jan 2008 08:03
by Antaeus
Please specify the exact version of SDAC. You can see it in the About sheet of TMSConnection Editor.
Also specify, for what reasons this code does not work (any errors are raised or anything else).

Posted: Mon 28 Jan 2008 12:24
by aytaral
sdac version 3.70.0.24
Server connection any problem affect to client side
this message showing and locking the program;
[DBNETLIB][ConnectionWrite(WapperWrite)).Global network error, read for network documents.

Posted: Tue 29 Jan 2008 08:34
by Antaeus
If connection was lost, SDAC 3 will try to reconnect automatically on subsequent executions of a query. If the connection is not recovered, you will get an exception again.
SDAC 4 has more powerful functionality for working with unstable networks. It can reexecute commands that were not executed because of network issues (Local Failover), and automatically disconnect if the connection is inactive (Disconnected Model).

Posted: Tue 29 Jan 2008 22:21
by aytaral
i want try for sdac4, what i use this option(disconnectmode,failover) on uptairs code ?

Posted: Wed 30 Jan 2008 08:25
by Antaeus
Please take a look at the FailOver demo. It demonstrates working with these and some other options.
You can find this demo in the SDAC_InstDir\Miscellaneous\FailOver\ directory. The path may vary depending on your IDE. SDAC_InstDir is the SDAC installation directory on your computer.