Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DB Maintenance - Locking Out Users While Uploading and Downloading the DB

ASP 102

DB Maintenance - Locking Out Users While Uploading and Downloading the DB

by  Bullschmidt  Posted    (Edited  )
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
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top