Any Network Connection problem to affect msconnection

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
aytaral
Posts: 9
Joined: Sat 26 Jan 2008 15:49

Any Network Connection problem to affect msconnection

Post by aytaral » Sat 26 Jan 2008 15:52

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.

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Mon 28 Jan 2008 08:03

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).

aytaral
Posts: 9
Joined: Sat 26 Jan 2008 15:49

Post by aytaral » Mon 28 Jan 2008 12:24

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.

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Tue 29 Jan 2008 08:34

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).

aytaral
Posts: 9
Joined: Sat 26 Jan 2008 15:49

Post by aytaral » Tue 29 Jan 2008 22:21

i want try for sdac4, what i use this option(disconnectmode,failover) on uptairs code ?

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Wed 30 Jan 2008 08:25

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.

Post Reply