|
-
Jan 23rd, 2008, 07:56 AM
#1
Thread Starter
Lively Member
[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!
-
Jan 23rd, 2008, 08:25 AM
#2
Re: [2005] Database Connection
You could do a File Exsists check. What version of VB are you using?
Sometimes the Programmer
Sometimes the DBA
Mazz1
-
Jan 23rd, 2008, 09:00 AM
#3
Thread Starter
Lively Member
Re: [2005] Database Connection
2005. Would that work better than a ping test? Looking for something that could run fairly quick as well.
Thanks!
-
Jan 23rd, 2008, 09:14 AM
#4
Re: [2005] Database Connection
That should be quick. Try Sustem.IO.FileExsist(filename)
Sometimes the Programmer
Sometimes the DBA
Mazz1
-
Jan 23rd, 2008, 09:15 AM
#5
Re: [2005] Database Connection
Wouldn't it be simpler, and far less code, to just error trap the connection code, and run with it?
-
Jan 23rd, 2008, 05:37 PM
#6
Thread Starter
Lively Member
Re: [2005] Database Connection
Can you give me a code example of the error trap? Thanks!
-
Jan 24th, 2008, 08:33 AM
#7
Re: [2005] Database Connection
That would the depend on the programing language you are using
Sometimes the Programmer
Sometimes the DBA
Mazz1
-
Jan 24th, 2008, 09:03 AM
#8
Thread Starter
Lively Member
Re: [2005] Database Connection
-
Jan 24th, 2008, 09:09 AM
#9
Re: [2005] Database Connection
VB6? VB.Net 2003? .Net 2005? .Net 2008?
Sometimes the Programmer
Sometimes the DBA
Mazz1
-
Jan 24th, 2008, 09:21 AM
#10
Re: [2005] Database Connection
If you are using VB.NET 2005, then you would use the Try/Catch/Finally method of error trapping.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|