Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Check db connection.

Author  Topic 

TazMania
Yak Posting Veteran

63 Posts

Posted - 2003-09-30 : 07:10:06
Hi,

Is there a way redirecting an user to another page when I'll lets say either changing the database structure or information.

I made a similar code for msaccess If I was updating the database etc. I would rename the msaccess file and the user would be redirected with text saying something like The database is currently being updated

The asp code could be something like this.

If sqldb running then
Show data
Else
response.Redirect "dberror.asp"
End If
contents of dberror.asp The database is currently being updated

Is that possible in sql2000 ?

Best regards
Taz

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2003-09-30 : 12:47:54
What we do is enable a downtime page in IIS. The downtime page contains generic information about maintenance occurring.

Tara
Go to Top of Page

TazMania
Yak Posting Veteran

63 Posts

Posted - 2003-10-02 : 06:48:38
Hi Tara,

Thx for the reply :) but my problem is that I haven't got direct access to that iis, so I can't create another site start/stop the original one etc.

That is why i'm looking for a way to do this via a script.

Best regards
Taz
Go to Top of Page

uberman
Posting Yak Master

159 Posts

Posted - 2003-10-02 : 10:11:48
edit global.asa

add application("live") = true

on page to check

if application("live") = false then response.redirect("/sorry.asp")

when you are about to update, change global.asa to
application("live") = false

and back to true when you are finished
Go to Top of Page
   

- Advertisement -