以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 备份文件的源代码问题 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=71156) |
-- 作者:opoo208 -- 发布时间:2015/7/6 14:15:00 -- 备份文件的源代码问题 Dim f As String Dim fc As String Dim rqf As Date = Date.today Dim rq As String=Format(rqf, "yyyyMMdd") Dim q As Date = Date.now Dim s As String=Format(q, "HHmmss") Dim Names As String() = {"设置"} For Each Name As String In Names Dim ex As New Exporter ex.SourceTableName = name \'指定导出表 ex.filepath = ProjectPath & "backup" & "\\" & rq & "-" & s & ".mdb" \'指定目标文件 ex.PassWord="shoubang.com" ex.Export() \'开始导出 f=ex.filepath fc=f & "c:/" Next EncryptFile(f, fc, "fox") FileSys.DeleteFile(f,2,2) MessageBox.Show("备份数据保存成功!" & fc) 备份找不到路径。不知道什么原因,谁能分析一下。
|
-- 作者:大红袍 -- 发布时间:2015/7/6 14:57:00 -- Dim f As String Dim fc As String Dim rqf As Date = Date.today Dim rq As String=Format(rqf, "yyyyMMdd") Dim q As Date = Date.now Dim s As String=Format(q, "HHmmss") Dim Names As String() = {"表A"} For Each Name As String In Names Dim ex As New Exporter ex.SourceTableName = name \'指定导出表 ex.filepath = ProjectPath & "backup" & "\\" & rq & "-" & s & ".mdb" \'指定目标文件 ex.PassWord="shoubang.com" ex.Export() \'开始导出 f=ex.filepath fc=f & "加密" Next EncryptFile(f, fc, "fox") FileSys.DeleteFile(f,2,2) MessageBox.Show("备份数据保存成功!" & fc) |