这样,用SQL来实现
Dim sql As String, rs As New ADODB.Recordset
sql = "Backup database jxc to Disk='" & SaveUrl & "'"
Set rs = Conn.Execute(sql)
Set rs = Nothing
Gadocn_app.Close

解决方案 »

  1.   

    简单的方法使用API
    Private Declare Function CopyFile Lib "kernel32" Alias "CopyFileA" (ByVal SFile As String, ByVal DFile As String, ByVal Bool As Long) As Long
    '如果在Bas文件可以把Private 去掉
    Private Sub Command1_Click()
        Dim b As Long
        Dim x As Long
        x = CopyFile("c:\temp\dn.mdb", "c:\temp\dn2.mdb", b)
    End Sub
    在你打开数据库后使用CopyFile就可以了