注册 登录
编程论坛 ASP技术论坛

求救~~~Microsoft VBScript 运行时错误 错误 '800a0034'

robbergt 发布于 2016-04-28 13:17, 4544 次点击
<%
dim Dbpath,bkfolder,bkdbname,fso,fso1
sub updata()
Dbpath="datebase.mdb"
Dbpath=server.mappath(Dbpath)
bkfolder="shenchentxt\datebase"
bkfolder=server.mappath(bkfolder)
bkdbname=date()&".mdb"
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
xk="shenchentxt\datebase\"&bkdbname
xk2="datebase\"&bkdbname
session("xk")=xk
session("xk2")=xk2
response.Redirect"mdbfile.asp"
Else
response.write "找不到您所需要备份的文件。"
End if
end sub
'------------------检查某一目录是否存在-------------------
Function CheckDir(FolderPath)
folderpath=Server.MapPath(".")&"\"&folderpath
    Set fso1 = CreateObject("Scripting.FileSystemObject")
    If fso1.FolderExists(FolderPath) then
       '存在
       CheckDir = True
    Else
       '不存在
       CheckDir = False
    End if
    Set fso1 = nothing
End Function
'-------------根据指定名称生成目录-----------------------
Function MakeNewsDir(foldername)
dim f
    Set fso1 = CreateObject("Scripting.FileSystemObject")
        Set f = fso1.CreateFolder(foldername)<< 错误的文件名或号码   /mdbfile.asp,行 131
        MakeNewsDir = True
    Set fso1 = nothing
End Function
%>

[此贴子已经被作者于2016-4-28 13:18编辑过]

0 回复
1