Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 5 of 5 total
Thread Losing databse path after connection
Sun, Nov 26 2006 10:01 PMPermanent Link

Kerry Neighbour
I am using DBISAM 4.24

I have an application that uses DBISAM over the local network. This is usually
just a local connection to a mapped path. No, problems, this usually works
just fine.

As a final polish, I would like the system to degrade nicely if the LAN connection
fails. ie someone pulls out the network cable or something. At present, what
happens is that the next time a DBISAM action occurs, the application just
hangs as it trys to connect. It never seems to time out, although I have
not left it all that long, so perhaps it will eventually.

Is there some central way that anyone uses to gracefully disconnect the DBISAMDatabase
in such a situation? I have tried using the DBISAMDatabase.connected flag,
but it seems that this flag is wrong - or it does not update enough.

I have thought of having a timed event (ie every 10 seconds or so) that does
a quick Open/close and if that fails to disconnect the DBISAMDatabase. But
it strikes me that this is far from failsafe, nor even fast enough. Which
is why I am asking here...is there some central and quick way of doing this?



Kerry Neighbour

Mon, Nov 27 2006 4:21 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Kerry


>As a final polish, I would like the system to degrade nicely if the LAN connection
>fails. ie someone pulls out the network cable or something. At present, what
>happens is that the next time a DBISAM action occurs, the application just
>hangs as it trys to connect. It never seems to time out, although I have
>not left it all that long, so perhaps it will eventually.

This surprises me. I also use use DBISAM in fileshareing mode (although I use UNC paths) and if the connection is lost I get an error message fairly quickly.

>Is there some central way that anyone uses to gracefully disconnect the DBISAMDatabase
>in such a situation? I have tried using the DBISAMDatabase.connected flag,
>but it seems that this flag is wrong - or it does not update enough.

I've never been able to figure one out.


>I have thought of having a timed event (ie every 10 seconds or so) that does
>a quick Open/close and if that fails to disconnect the DBISAMDatabase. But
>it strikes me that this is far from failsafe, nor even fast enough. Which
>is why I am asking here...is there some central and quick way of doing this?

This wouldn't work unless you open your tables EVERY time before use. The LAN connection can be lost, then restored. If you had tables open when it got lost you've had it.

The only thing to do is switch to client/server or take the risk.

Roy Lambert
Mon, Nov 27 2006 1:32 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Kerry,

<< As a final polish, I would like the system to degrade nicely if the LAN
connection fails. ie someone pulls out the network cable or something. At
present, what happens is that the next time a DBISAM action occurs, the
application just hangs as it trys to connect. It never seems to time out,
although I have not left it all that long, so perhaps it will eventually. >>

Unfortunately, this type of situation is out of our hands.  Once a Win32 API
call is made to the OS for accessing a resource over the network, it is up
to the OS as to when and how it returns with an error/success code.  If you
want finer-grained control over network connections, then you'll have to use
the DBISAM C/S version.

--
Tim Young
Elevate Software
www.elevatesoft.com

Mon, Nov 27 2006 4:33 PMPermanent Link

Kerry Neighbour
> This surprises me. I also use use DBISAM in fileshareing mode
> (although I use UNC paths) and if the connection is lost I get an
> error message fairly quickly.

If I am lucky, I will get as DBISAM error message, but usually the system
just hangs with no message at all. But even the DBISAM message is no good
- it is gibberish to a user and quite unfriendly.

> The only thing to do is switch to client/server or take the risk.

Yes, I agree. But most of my users will not opt for that option. Anyway,
I recognise that it is not a DBISAM issue, rather one of the OS, but was
wondering how other people got around the problem.

I guess I will just igmnore the problem. It is not one that will occur all
that often, one would suppose.

Tue, Nov 28 2006 11:57 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Kerry,

<< I guess I will just igmnore the problem. It is not one that will occur
all that often, one would suppose. >>

Hopefully not.  LAN connections are usually quite stable in comparison to
WAN connections.  The only time you usually see an issue is with
catastrophic breaks or faulty wiring to start with.

--
Tim Young
Elevate Software
www.elevatesoft.com

Image