Solved

Handling network errors

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VBA color chart bars 12 77
Excel VBA combine two working workbooks 8 46
change vba from autofit to 13.5 width? 4 28
Help me. 3 45
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

911 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

22 Experts available now in Live!

Get 1:1 Help Now