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

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

WBOY
Release: 2016-06-07 15:36:51
Original
1583 people have browsed it

两种情况,一个是没有数据库驱动,一个是数据库路径错误。 例子: 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

source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template