Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Verifying a Database Connection

New Here ,
May 15, 2006 May 15, 2006
There has to be a easy way to do this. I use dreamweaver to do all my ASP web development. I have a particular application that I want to verify if my database connection is available and, if so, display an appropriate message. Pretty simple I think but I can't seam to figure it out how to do it.

I though maybe a simple "IF... THEN... ELSE..." maybe, such as

IF my_database is available
THEN write "The Database is available"
ELSE write "The Database is NOT available"
END IF

Does anyone know exactly what I need to write in order to do this? In case you need to know I'm connecting to a MS Access database.

Thanks!
TOPICS
Server side applications
202
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 15, 2006 May 15, 2006

"CurtTheBeginner" <webforumsuser@macromedia.com> wrote in message
news:e4ap34$8uq$1@forums.macromedia.com...
> There has to be a easy way to do this. I use dreamweaver to do all my ASP
> web
> development. I have a particular application that I want to verify if my
> database connection is available and, if so, display an appropriate
> message.
> Pretty simple I think but I can't seam to figure it out how to do it.

this may be a little on the boring side, what what about having a recordset
on the page that has some sort of query that you now will return data... and
then have two small images (or two sets of text) and then do a "show region"
server behavior? If the recordset = true you show one bit of text... if the
recordset = not true you show the other item.


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 15, 2006 May 15, 2006
LATEST
Would that actually work though? If the database connection is down could you actually perform that test or would the page just fail all together? I'm basically looking for a way to test the connection before performing any queries.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines