Solved

How to notify user when path is not accessable due to connection lost

Posted on 2007-04-03
2
137 Views
Last Modified: 2010-08-05
I want to develop a simple databse application using VB6 and one of the function is to access a network path. How to notify user if the application not able to access the path due to connection lost or network breakdown? Pop up a msg instead of application error due to cannot access path?
0
Comment
Question by:mr_avril
2 Comments
 
LVL 49

Accepted Solution

by:
Ryan Chong earned 50 total points
ID: 18848612
>>Pop up a msg instead of application error due to cannot access path?

Yup, perhaps you need a better error handling here, like:

Sub YourProcess()
    on error goto ErrorHandler

    'your stuff here...

    Exit Sub
ErrorHandler:
    Msgbox "Connection Lost, blabla.."

'   Msgbox err.number & ":" & err.description

End Sub
0
 
LVL 12

Expert Comment

by:jkaios
ID: 18848631
The best way is to, at least, report a visual indication to the user when the path does not exist.

If Dir("\\server\somepath\", vbDirectory) = "" Then
   MsgBox "The specified path doesn't exist or is currently inaccessible!", vbCritical
End If
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…

760 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

23 Experts available now in Live!

Get 1:1 Help Now