日期:2014-05-17  浏览次数:21135 次

求助数据库备份
请高手帮忙看看


Function FormSaveDBBakAdminCtl()

If CTL_DB_TYPE <> 0 Then
Call GBL_objException.catchErr(E_ADMIN_PUB,"本功能仅对采用Access数据库的系统有效") 
Exit Function
End If 

'== 服务器端数据校验
If Not ServerDataCheck(arrDBBakDataChk) Then
Exit Function
End If
 
'== 数据获取
Call CnvFormData(strDBBakDataChk,GBL_objFormData) 

GBL_objFormData.Item("DBPath") = Server.Mappath(GBL_strHomeUrl & GBL_objFormData.Item("DBPath"))

Dim strBackupFolder,strBkdbname,objFSO,f
 
strBackupFolder = Trim(GBL_objFormData.Item("BakDBPath"))
strBackupFolder = Server.Mappath(GBL_strHomeUrl & strBackupFolder)
strBkdbname = Trim(GBL_objFormData.Item("BakDBName"))
Set objFSO = server.Createobject(GetServiceAppLogic("SITE","FSOName"))
if objFSO.FileExists(GBL_objFormData.Item("DBPath")) then
If Not objFSO.FolderExists(strBackupFolder) Then
Set f = objFSO.CreateFolder(strBackupFolder)
end if
objFSO.copyfile GBL_objFormData.Item("DBPath"),strBackupFolder& "\" & strBkdbname,True 
Else
Call GBL_objException.catchErr(E_ADMIN_PUB,"没有找到您所需要备份的数据库文件!") 
Exit Function
End If 

Call SaveLogLogic(GBL_intAdminId,CONST_PAGE_AUTHEN,"备份了数据库成功,备份的数据库路径为:" & strBackupFolder & "\"& strBkdbname)  

'== 成功处理
Dim strHtmlCode,strSuccUrl
strHtmlCode = "备份数据库成功,备份的数据库路径为:" & strBackupFolder & "\"& strBkdbname
strSuccUrl = "admin/admin_db_bak_form.asp"
Call SuccExecute(strHtmlCode,strSuccUrl)

End Function
%>



点备份后出现
Microsoft VBScript 编译器错误 '800a0408' 

无效字符 

红色那行

------解决方案--------------------
红色那行最后有个全角的空格,要去掉