Alaska Software Inc. - How to know if a database connection was lost
Username: Password:
AuthorTopic: How to know if a database connection was lost
Joao GrenhasHow to know if a database connection was lost
on Fri, 21 Apr 2017 20:03:57 +0100
Hello all,
imagine the following cenario:
- A mapped network drive, example, M:
- An application in M:\Test\Test.exe opening M:\Test\Test.DBF
- We disconnect the network cable (1m, 2m, whatever...).
- We reconnect the network cable.
- If we try to do database operations it will generate errors because of 
lost connection. Not always in the same place: LastRec(), Dbskip(), 
DbGoBottom(), DbRunlock(), etc...

First: The reason to disconnect the network cable is just to force the 
situation. The real situation is to somehow lost it and get i back. Example, 
a power failure and some router along the way rebooted, or any other 
situation...

Question: Is there a way to know if that situation happenned? Any Xbase++ 
configuration or funcion? Something like "HasLostConnection"?

Best Regards
Jacob JohnRe: How to know if a database connection was lost
on Sat, 02 Feb 2019 16:53:30 +0530
Hi,

I am also facing this issue at many client sites. Is there any
solution for this ?

Regards
Kiron


On Fri, 21 Apr 2017 20:03:57 +0100, Joao Grenhas wrote:

>Hello all,
>imagine the following cenario:
>- A mapped network drive, example, M:
>- An application in M:\Test\Test.exe opening M:\Test\Test.DBF
>- We disconnect the network cable (1m, 2m, whatever...).
>- We reconnect the network cable.
>- If we try to do database operations it will generate errors because of 
>lost connection. Not always in the same place: LastRec(), Dbskip(), 
>DbGoBottom(), DbRunlock(), etc...
>
>First: The reason to disconnect the network cable is just to force the 
>situation. The real situation is to somehow lost it and get i back. Example, 
>a power failure and some router along the way rebooted, or any other 
>situation...
>
>Question: Is there a way to know if that situation happenned? Any Xbase++ 
>configuration or funcion? Something like "HasLostConnection"?
>
>Best Regards
Otto TrappRe: How to know if a database connection was lost
on Tue, 05 Feb 2019 18:46:40 +0100
Hello,

We use same scenario: mapped drive with shared folder where .exe resides 
with dbf/cdx database.

Every week more customers report (auto function built in the exe) 
runtime errors where .exe quits with internal data structures corrupted 
at various program codes, it can be a local variable declaration. 
Sometimes a workarea is suddenly no longer available. There are places 
in the code where an accidental close of a workarea can be easily ruled out.

Some days ago I could even trace back from a callstack that at a site 
Antivirus software hindered the .exe from expanding an array with 3 
elements which led to a runtime error. It seemed almost unbelievable but 
it was true. If I generated the report with AV on I got the runtime 
error, if I switched off AV the same app worked without error.

If it is true (I am sure it is) then nasty things can happen..

So the lost connection can be because of AV software I think.

Best Regards,
Otto