Solved

Handling network errors

Posted on 2000-02-13
3
162 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
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
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…
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

743 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now