数据库备份和回复源代码access
数据库 备份和回复 access数据库是Access的,我使用BACKUP的SQL语句,系统提示“无效的SQL语句”难道Backup不支持Access?用filec数据库恢复: Dim conn As New adodb.Connection Dim rec As New adodb.Recordset 'SQLserver数据服务器名称;SQLuser数据服务器用户名称(一般为SA);SQLpaswd数据库用户密码 basename = "master" temstring = "driver={SQL Server};server=" & SQLsever & ";database=" & basename & ";uid=" & SQLuser & ";pwd=" & SQLpaswd & ";" restorefilename = "'" & Trim(Dir1.Path) & "'\'" & Trim(File1.FileName) & "'" 'Dir1.Path为数据库存放的目录;File1.FileName为数据库名称 conn.Open temstring conn.Execute ("restore database bikemag from disk='" & restorefilename & "'") conn.Close opy 函数,复制来实现备份
用户评论