|
-
Apr 10th, 2005, 04:09 AM
#1
Thread Starter
New Member
How to check if the server is available!!
Hi People
In my application I should connecto to SQL Server first. therefore, I would like to know how to check if the SQL Server is online or no. in other words, when I click connecto to the server button I should check if the server is available or no.
Please can someone tell me how
Thanks
Eteleeb
-
Apr 10th, 2005, 05:05 AM
#2
Re: How to check if the server is available!!
 Originally Posted by Eteleeb
Hi People
In my application I should connecto to SQL Server first. therefore, I would like to know how to check if the SQL Server is online or no. in other words, when I click connecto to the server button I should check if the server is available or no.
Please can someone tell me how
Thanks
Eteleeb
If you are using VB6 then use On Error Go to Error handler to catch error, if .net then use Try Catch to catch any error and if any error occurs that means Server is not available.
[VBF RSS Feed]
There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.
If I have been helpful, Please Rate my Post. Thanks.
This post was powered by : 
-
Apr 10th, 2005, 02:48 PM
#3
Thread Starter
New Member
Re: How to check if the server is available!!
Yes that's true but what I want to do is making connection only to the server without mentioning the database name or the uid or password in my connection string. can you please tell how the connection string will look like?
-
Apr 10th, 2005, 04:35 PM
#4
Re: How to check if the server is available!!
Eteleeb,
You are asking for two seperate issues. Connecting to a database is not the same as connecting to a server. The database may be on a server, but so may other apps. There is no connection string to connect to a server, only to a database.
You can see if a server is up by pinging it (if allowed) or by checking an app or file on it (which in essense is a connection).
-
Apr 10th, 2005, 05:52 PM
#5
Thread Starter
New Member
Re: How to check if the server is available!!
Thank you guys for explainig things. now it is clear and I got it.
I really appreciate that
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
|