ASP database Backup program, this program is my beginner to use FSO to write an online file backup code, simple also more practical, just access to the database, backup principle is to copy the file to our point of view, well below look at the source.
<%
Dim action,start,index1
Start=request. Form ("Start")
Index1=request. Form ("index")
Action=request. QueryString ("Action")
If Action=1 Then
Call Admin ()
Call Startdata (START,INDEX1)
End If
Sub Startdata (start_d,index_d)
Call F_s_o ()
On Error Resume Next
Set Copy_file=fi.getfile (server. MapPath (INDEX1))
Copy_file.copy server. MapPath (Start)
If Err=0 Then
Response. Write ("<script language= ' JavaScript" >alert (' database backup succeeded! '); History.back ();</script> ")
Else
Response. Write ("<script language= ' JavaScript ' >alert (' database backup failed! '); History.back ();</script> ")
End If
End Sub
%>