Home >Database >Mysql Tutorial >网页制作asp连接access数据库,无论如何也连不上,也不显示错误

网页制作asp连接access数据库,无论如何也连不上,也不显示错误

WBOY
WBOYOriginal
2016-06-07 15:36:511581browse

两种情况,一个是没有数据库驱动,一个是数据库路径错误。 例子: Db = data/data.mdb ConnStr = Provider = Microsoft.Jet.OLEDB.4.0;Data Source = Server.MapPath(db) '另外一种 'ConnStr = Driver={Microsoft Access Driver (*.mdb)}; DBQ= Server.MapPa

两种情况,一个是没有数据库驱动,一个是数据库路径错误。

例子:

Db = "data/data.mdb"
ConnStr = "Provider = Microsoft.Jet.OLEDB.4.0;Data Source = " & Server.MapPath(db)

'另外一种
'ConnStr = "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath(db)

Set Conn = Server.CreateObject("ADODB.Connection")
Conn.open ConnStr

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn