数据库备份:
Dim conn As New adodb.Connection
Dim rec As New adodb.Recordset
Dim backupfilename As String '备份数据库存放地址以及名称'
db = "Driver={SQL Server};Server=" & SQLserver & _
";Database=" & SQLbase & ";uid=" & SQLuser & ";pwd=" & SQLpaswd & ";"
conn.Open db '打开数据库连接
b = "backup database bikemag to disk='" & backupfilename & "'"
conn.Execute (b)
conn.close
另外SQL2000数据库可以手动进行数据库备份,不需要用代码执行。