Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Testing for SQL Availability in ASP

Reply
Thread Tools

Testing for SQL Availability in ASP

 
 
ccg
Guest
Posts: n/a
 
      08-04-2004
In ASP (vbscript) is there a way to check to see if a SQL server is
online before trying to open a connection?

I have a situation where we have a SQL server that may be offline for
a couple minutes and right the ASP page returns:

Microsoft OLE DB Provider for SQL Server error '80004005'

[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or
access denied.

I'd like to be able to first check to make sure the server is
available and if NOT, then skip the database connection on that page
altogether. Or, at least load the page without showing the error. I
have on error resume next but it still displays this error.

Thanks!



 
Reply With Quote
 
 
 
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      08-04-2004
Already answered over in .db

Please do not multipost ccg. This is definitely a database-related
question so .asp.db was the perfect group in which to post it. Posting it
here as well did not increase your chances of getting an answer (most of us
subscribe to both groups). On the contrary, if somebody had taken his time
to answer it here, only to find that it was already resolved in the other
group, that person may have been annoyed enough to ignore any future posts
from you, thereby decreasing your chances of getting help in the future.

There are times when you will not be sure which group is most appropriate
(again, this was not one of them), and you will want to post a question to
both groups. In that situation, you should use the cross-posting technique,
rather than posting the same message multiple times. To crosspost, put
a semicolon-delimited* list of the newsgroups to which you wish to post in
the To: header of your post and post it once. It, and any replies to it,
will appear in all the newsgroups in your list. So, if I reply in .asp.db,
my reply will also appear here in .asp.general.

* ... or whatever delimiter is recognized by your news client

Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP.NET 2.0 session availability in Global.asax? kingski ASP .Net 4 10-10-2008 05:49 PM
SQL Reference, SQL Queries, SQL help ecoolone ASP .Net 0 01-03-2008 10:58 AM
how to monitor website availability from an ASP.NET app? Bob ASP .Net 2 08-16-2007 03:27 AM
Testing the availability of a module Bo Peng Python 12 12-19-2005 07:26 PM
testing the availability of a font Martin RAYROLE Javascript 2 12-04-2003 10:03 AM



Advertisments