[2005] Database Connection
I have an access database that resides on the network. What is the recommended method of verifying connectivity with this database before connecting the program. I'd basically just like to do a ping test or something to determine if the server is found if not throw a message.
Thanks all!
Re: [2005] Database Connection
You could do a File Exsists check. What version of VB are you using?
Re: [2005] Database Connection
2005. Would that work better than a ping test? Looking for something that could run fairly quick as well.
Thanks!
Re: [2005] Database Connection
That should be quick. Try Sustem.IO.FileExsist(filename)
Re: [2005] Database Connection
Wouldn't it be simpler, and far less code, to just error trap the connection code, and run with it?
Re: [2005] Database Connection
Can you give me a code example of the error trap? Thanks!
Re: [2005] Database Connection
That would the depend on the programing language you are using
Re: [2005] Database Connection
Re: [2005] Database Connection
VB6? VB.Net 2003? .Net 2005? .Net 2008?
Re: [2005] Database Connection
If you are using VB.NET 2005, then you would use the Try/Catch/Finally method of error trapping.