同样是数据备份,为什么在我的机子上可以,在别的机上不行!!

mingsunday 2005-06-05 12:24:08
如下这段备份数据代码

ElseIf Request.QueryString("type")="backdb" Then
myPath = Request("txtPath")
myFile = Request("txtFileName")
Set fso = CreateObject("Scripting.FileSystemObject")
If not fso.FolderExists(myPath) Then
On error resume next
Set f = fso.CreateFolder(myPath)
If Err.number<>0 then
Response.Write "<script>"
Response.Write "alert('输入路径有错,请重新输入!');"
Response.Write "history.go(-1);"
Response.Write "</script>"
Response.End
End If
End If
strSql = "USE master BACKUP DATABASE jxwzzb TO DISK='"& myPath &"\"& myFile &"'"
conn.Execute strSql
'记录管理员操作日志
SiteLogAdmin "","","","247"
Response.Write "数据库已经备份成功!<br>"
Response.Write "<p> </p>"
在自己机子上能很好运行。放到别的机子上就提示如下错误:

Microsoft OLE DB Provider for ODBC Drivers 错误 '80040e14'

[Microsoft][ODBC SQL Server Driver][SQL Server]已将数据库上下文改为 'master'。

/manage/info/backup.asp,行 196

谁知道这是怎么回事啊,怎么解决?谢谢啦
...全文
135 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
mingsunday 2005-06-05
  • 打赏
  • 举报
回复
不太理解你的意思,其他数据库操作都没问题啊
老戴12345654 2005-06-05
  • 打赏
  • 举报
回复
可能是你的SQL 登录账号权限不够

110,533

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧