ASP DB连接错误80004005 [英] ASP DB Connection Error 80004005
问题描述
任何人都知道以下代码中的问题在哪里?
它是如此简单却无法解决?给出这个错误?
[PHP]
Microsoft JET数据库引擎错误''80004005''
无法打开数据库'' ''。它可能不是您的应用程序识别的数据库,或者该文件可能已损坏。
dbfile.asp,第3行
[/ PHP]
[PHP]
dim db,strConn,Path
Path = Server.MapPath(db.mdb)
strConn =" PROVIDER = MICROSOFT.JET.OLEDB.4.0; DATA SOURCE =" &安培;路径
设置db = Server.CreateObject(" ADODB.Connection")
db.open strConn
[/ PHP ]
Hi any body know''s where is the problem in following code ?
it''s so simple but can''t figer it out ? giving this error ?
[PHP]
Microsoft JET Database Engine error ''80004005''
Cannot open database ''''. It may not be a database that your application recognizes, or the file may be corrupt.
dbfile.asp, line 3
[/PHP]
[PHP]
dim db, strConn, Path
Path = Server.MapPath( db.mdb )
strConn = "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=" & Path
Set db = Server.CreateObject("ADODB.Connection")
db.open strConn
[/PHP]
推荐答案
您是否需要在数据库名称周围加上引号?例如
Do you need to put quote marks around the name of your database? e.g.
回复的Thx我试过但现在在第5行给出了新的错误
i认为这是同一行错误
我只是放了一些 "但是实际上它仍适用于本地主机&在NET托管服务器上给出错误
Thx for the reply i''ve tried it but now giving new error on line 5
i think so it''s same line error
i''ve just put some " " but still
well actually it''s works on the local host & giving error on the NET Hosting server
这是一个新错误吗?如果是这样的话是什么?
Is it a new error? If so what is it?
这篇关于ASP DB连接错误80004005的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!