Solved

Handling network errors

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
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…
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…
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…

679 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