Solved

Handling network errors

Posted on 2000-02-13
3
171 Views
Last Modified: 2010-05-02
How do you handle network errors in VB 6.0. I am trying to access an Access database from VB6.0. If the network cable is removed the machine freezes. I have placed an error handler but it does not work, after a long time the datasource dialog is shown. I just want an error message to be shown. Your assistance would be most appreciated.

Thanx in advance.
0
Comment
Question by:Arnima
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 2

Expert Comment

by:danelroisman
ID: 2518237
Try to use GetLastError() Api
0
 
LVL 1

Expert Comment

by:cvidler
ID: 2518337
your problem is the timeout value (sets how long vb/access) will wait until flagging an error - NO error handler will work for you - the only way is to shorten the timeout value to something more appropriate - you'll ahve to check throught the Access/SQL server manuals for this setting as I can't help you on it...
0
 

Accepted Solution

by:
staffiidba earned 50 total points
ID: 2518370
If using the ADO connection, there are two timeout values that would help.
The first is the query-timeout value.
The second is more a server / network timeout value.
Both should be available if using the ADO control. Play with these and see if it helps. If not, let us all know and we will try something else.
0

Featured Post

Enroll in June's Course of the Month

June’s Course of the Month is now available! Experts Exchange’s Premium Members, Team Accounts, and Qualified Experts have access to a complimentary course each month as part of their membership—an extra way to sharpen your skills and increase training.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question