艾司西酞普兰片:备份access数据库的asp文件

来源:百度文库 编辑:高校问答 时间:2024/04/30 15:09:20
有一个网站程序,我想加一个备份access数据库的功能,那asp文件怎么写呢?请高手们帮帮忙吧

我做的一个备份程序片段
sub backupdata()
Dbpath=request.form("Dbpath")
Dbpath=server.mappath(Dbpath)
bkfolder=request.form("bkfolder")
bkdbname=request.form("bkdbname")
Set Fso=server.createobject("scripting.filesystemobject")
if fso.fileexists(dbpath) then
If CheckDir(bkfolder) = True Then
fso.copyfile dbpath,bkfolder& "\"& bkdbname
else
MakeNewsDir bkfolder
fso.copyfile dbpath,bkfolder& "\"& bkdbname
end if
response.write "备份数据库成功,您备份的数据库路径为<br>" &bkfolder& "\"& bkdbname
Else
response.write "找不到您所需要备份的文件。"
End if
end sub