做了个数据库备份的界面 提示错误
采用data控件和commond控件,databasename=c:\filename出错提示“实时错误70,拒绝的权限”
报错语句“FileCopy Data1.DatabaseName, pathname
程序代码:
Private Sub Command1_Click() Dim response, pathname As String prompt$ = "确实要为数据库创建一个备份么?" response = MsgBox(prompt$, vbOKCancel + vbQuestion, "提示") If response = vbOK Then pathname = InputBox$("请输入备份文件的路径及文件名") If pathname = "" Then MsgBox "路径或文件为空!", vbCritical, "错误" Else FileCopy Data1.DatabaseName, pathname MsgBox "备份文件成功", , "提示" End If Else MsgBox "用户取消了创建备份操作", vbInformation, "提示" End If End Sub Private Sub Command2_Click() End End Sub