Disk or Network Error

J

Jack Leach

Occasionally my server will be unexpectedly unavailable while the clients are
still up. At this point my BE is out of commision whilst my FE's are still
attempting a connection.

The users get a message that states "Disk or Network Error". However, this
doesn't seem to be an actual trappable error (it's not caught by my global
handler, which is doesn't rely on a server connection, and there seems to be
no error number associated with it). You can click OK or Help... but you
have to click OK about 30 times before you can close the app in a somewhat
elegant manner.

I have an idea for a workaround... I keep a persistant connection form, and
I think I can run a timer event on this hidden form to test the connection
periodically to come up with a way to handle it. But, I'm not sure if a
timer will run on the form when this message is displayed, and network
connection tests take a bit of time and resource, so I don't want to be
trying to test the connection every 10seconds throughout the instance of the
app.

Any ideas, or is the timer the best I can do?

Thanks,


--
Jack Leach
www.tristatemachine.com

"I haven''t failed, I''ve found ten thousand ways that don''t work."
-Thomas Edison (1847-1931)
 
D

David H

To my knowledge, you cannot trap the error because of the nature of the code
within Access that throws it. I can't really elaborate as I can't provide the
full technical explanation behind it. But I believe that the code within
Access.exe that handles connecting to linked tables is rather high-level and
more or less at the same level as the code that handles all of the
Windows-related functions.

The MVPs should be able to provide a more technical explanation.

Regardless, you just have to deal with it as-is.
 
J

Jack Leach

Here's a few things I was able to find on the subject...


Tony's corruption symptoms page, Bug #26

http://www.granite.ab.ca/access/corruption/symptoms.htm

On the plus side, the reason I'm getting the error seems to be pretty
apparent (a faulty connection rather than an actual 'bug'). On the down
side, there's a possibility for corruption regardless of how the error comes
about that I need to contend with.



http://www.pcreview.co.uk/forums/thread-1068738.php

Another thread where the OP was having an intermittent connection that was
causing the problem (also a very probable cause of corruption).


Looks like a great time for an audit of my backup system.

The only "real" answer to this seems to be to make sure that it doesn't
happen (make sure the server is always up and the datafile is available).


--
Jack Leach
www.tristatemachine.com

"I haven't failed, I've found ten thousand ways that don't work."
-Thomas Edison (1847-1931)
 
V

vanderghast

There may be another solution, by introducing MS SQL Server as back end,
which has a reputation to be more resilient against corruptions due to lost
of connection. That may not solve the front end problem with an intermitent
connection, though. After all, if there is no connection, when one is
needed, what can be done? ... Replication? probably an overkill.


Vanderghast, Access MVP
 
J

Jack Leach

introducing MS SQL Server as back end,
which has a reputation to be more resilient against corruptions

I have heard of this, though it's a larger step than what I would prefer to
have to take.

After all, if there is no connection, when one is
needed, what can be done?

Very true.


The first time this happened due a tripped breaker... shortly after this I
moved the server and it's components to a dedicated source.

Yesterday we mounted the surge protector to the wall rather than under the
desk in hopes that noone can accidentaly hit the power switch on the strip
with their foot if its mounted on the wall.... <pulling out hair> too bad
that someone happened to be me :/

--
Jack Leach
www.tristatemachine.com

"I haven't failed, I've found ten thousand ways that don't work."
-Thomas Edison (1847-1931)
 
G

Gigamite

Jack said:
The first time this happened due a tripped breaker... shortly after this I
moved the server and it's components to a dedicated source.

Yesterday we mounted the surge protector to the wall rather than under the
desk in hopes that noone can accidentaly hit the power switch on the strip
with their foot if its mounted on the wall.... <pulling out hair> too bad
that someone happened to be me :/

Plug the server into a UPS with a built-in surge protector. It's really
hard to accidentally hit the power switch on a UPS with a foot, and if
the power goes out, the UPS's battery power will keep the server going
until it can be shut down.
 
D

David H

1) Upsizing to SQLServer isn't as daunting as it sounds or as costly. MS now
has SQLServer Express available for free. If I'm not mistaken, Access only
allows DB's up to 2GB where as SQL-E allows up to 4GB. I've been using it for
the last several months for an ASP.NET project and haven't had any problems
switching over to it...other than forgetting that if you delete a table and
it has triggers, the triggers get deleted as well...D'oh!

I would almost guess that you could have it upsized in a single day with
maybe another day or two to shake it down if that.

2) Didn't ask this previously, but if you're on a wireless connection ...
well you can probably guess where I'm going with that. Even though the PC may
be able to recover from a drop in the signal and seemingly remain connected,
Access can still loose the connection.

3) You can't guarantee that it isn't going to happen, but you can take steps
to ensure that it doesn't - hence be careful when using wireless connections.
I have only seen very, very, very few problems when the PC was hard wired and
then it was something beyond my control like the server going down.
 
J

Jack Leach

I've avoided wireless connections specifically for this reason.

At the present time I don't have much desire to switch to SQL Express, but
it certainly is something to consider in the future. I've recently started
studying VB.Net, so maybe as I progress there I'll make a simultaneous
introduction into SQLServer (as I expect to dabble with it during my
development with VB anyway).

My only issue with it at the moment is my sense of security with it... I
have never used it, and therefore would want to test, test, and retest
everything before I would feel comfortable indroducing it as the core of my
data storage for my company. This will take some time, and won't be an
immediate 'fix'. In any case, I do plan to explore this option within the
next couple months.

Thanks again for the input.

--
Jack Leach
www.tristatemachine.com

"I haven't failed, I've found ten thousand ways that don't work."
-Thomas Edison (1847-1931)
 
D

David H

Its actually much more secure than Access. Keep in mind that it is a
Big-Daddy database application for use (and used in) major applications on a
scale that far eclipses Access.
 
D

David H

Oh, as I 'm learning with ASP.NET, I'd switch do the switch to SQLServer
before you start developing in VB.NET as there are things that you can take
advantage of which will make the VB.NET development easier. Case in point,
I'm just now having to delve into Stored Procedures which I'm quickly falling
in love with as it shifts the burden of getting data away from the pages and
places it on SQLServer. As such, the presentation layer is just that
presentation only where pretty much all data access is via stored procedure
as opposed to having queries hard-coded into the pages. I'm also using sp's
for data updates whereby its just a matter of passing in the parameters
instead of rewriting the SQL statement.

UPDATE Contacts SET Name = 'John Smith' WHERE ContactId = '4242'

essentially becomes

Execute UpdateContacts "4242", "John Smith"

like executing a VBA sub/function. (Keep in mind *essentially*)
 
J

Jack Leach

So far I'm still familiarizing myself with forms in vb, haven't started with
any data yet. Mostly glorified calculators for machining functions (they're
easy and let me screw around with forms and controls), getting to know my way
around. I wouldn't even consider using access as a back to a vb app... no
sense in attaching a trailer to the back of a tricycle. When I start working
with data I'll start with SQL-E

--
Jack Leach
www.tristatemachine.com

"I haven't failed, I've found ten thousand ways that don't work."
-Thomas Edison (1847-1931)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top