如何打开不允许排它方式打开的数据库?急!!!

jianxuan 2003-06-30 05:27:04
对于一个不允许用排他方式打开的ACCESS数据库如何才能够打开其中的表?现在我的做法是:
dim myconn,connstr,strDBPath,strPassword
strDBPath="c:\bankmessage\data\bm.mdb"
strPassword="888888"
connstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\bm\data\bm.mdb;"'Password=888888"
sub ConnectData()
on error resume next
set myconn=server.createobject("ADODB.CONNECTION")
myconn.CommandTimeout=100
myconn.open connstr,,123456,&H10
if err then
err.clear
set myconn=nothing
Response.Write "<br><br><center><font color=red>服务器系统正在进行检查维护,请稍后再访问!</font></center>"
Response.End
end if

end sub
ConnectData
dim strSql,rsNF
strSql="select * from avnf where stat='A'"
Set rsNF=Server.CreateObject("ADODB.RecordSet")
On Error Resume Next
rsNF.Open "SELECT * FROM AVNF",myconn,3,1
Response.Write Err.description

可是总是报告如下错误:
在异步连接时,操作不能被执行。
怎么办呀?急!!!
...全文
52 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
jianxuan 2003-06-30
  • 打赏
  • 举报
回复
着急呀,快来帮帮我。

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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