Solved

Handling network errors

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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 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…

816 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