Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


Microsoft: ASP (Active Server Pages) FAQ

ASP 102

DB Maintenance - Locking Out Users While Uploading and Downloading the DB by Bullschmidt
Posted: 25 May 03 (Edited 3 Jun 03)

It is often convenient to have a way to lock out users from data-related pages when doing maintenance such as FTP'ing the database.

To do this you could temporarily "turn off" the database-related Web pages by having an included file perhaps called config.asp that has a variable perhaps called mbolSiteIsUp which is usually set to be True:
mbolSiteIsUp = True

But manually set this mbolSiteIsUp variable in the included file config.asp to be False when you do maintenance such as downloading or uploading the database:
mbolSiteIsUp = False

And on each page have code that if mbolSiteIsUp is False then it redirects to a page that explains that this part of the site is temporarily down for maintenance:
' If site down for maint.
If mbolSiteIsUp = False Then
 Response.Redirect "downformaint.asp"
End If

Or a cruder method (that would generate an ASP error for the user) would be to slightly rename the database while doing uploading and downloading.

Another way of downloading database information (in this case through HTTP instead of FTP) would be to provide a way for the user (and perhaps this would only be set to work for Admin level users) to download a CSV file of selected records.

Best regards,
J. Paul Schmidt
www.Bullschmidt.com - Freelance ASP Web Developer
www.Bullschmidt.com/DevTip.asp - ASP Web Developer Tips

Back to Microsoft: ASP (Active Server Pages) FAQ Index
Back to Microsoft: ASP (Active Server Pages) Forum

My Archive

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close