在线管理数据库 类(11)
ELse
AppPath = AppPath & "\"
End if
End function
'删除一个数据库文件
Public function DeleteDBFile(filespec)
filespec = AppPath() & filespec
Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
If Err.number<>0 Then
ErrMsg("删除文件发生错误!请查看错误信息:" & Err.number & " " & Err.Description & "<br>")
Err.Clear
DeleteDBFile = False
End If
If DbExists(filespec) THen
call fso.DeleteFile(filespec)
DeleteDBFile = True
Else
ErrMsg("删除文件发生错误!请查看错误信息:" & Err.number & " " & Err.Description & "<br>")
DeleteDBFile = False
Exit Function
End if
Set fso = Nothing
End function
'修改一个数据库名
Public function RenameDBFile(filespec1,filespec2)
filespec1 = AppPath() & filespec1:filespec2 = AppPath() & filespec2
Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
If Err.number<>0 Then
ErrMsg("修改文件名时发生错误!请查看错误信息:" & Err.number & " " & Err.Description)
内容版权声明:除非注明,否则皆为本站原创文章。