ASP连接数据库,显示内部500错误
<% Set conn=Server.CreateObject("ADODB.Connecton") conn.open"Driver={Microsoft Access Driver(*.mdb)};DBQ=" & server.MapPath("\") & "\db1.mdb;UID=sa;PWD=;" Response.Write "连接成功!" Set conn=nothing Response.Write "断开连接!" %>
<% Set conn=Server.CreateObject("ADODB.Connecton") conn.open"Driver={Microsoft Access Driver(*.mdb)};DBQ=" & server.MapPath("\") & "\db1.mdb;UID=sa;PWD=;" Response.Write "连接成功!" Set conn=nothing Response.Write "断开连接!" %>
答案:conn.open 后面要加空格吧。。。。。第2。。UID=sa; MDB数据库一般不设用户和密码的吧。
要默认的话好象也是 ADMIN啊?
Set conn=Server.CreateObject("ADODB.Connecton")
conn.open "Driver={Microsoft Access Driver(*.mdb)};DBQ=" & server.MapPath("\") & "\db1.mdb;"
Response.Write "连接成功!"
Set conn=nothing
Response.Write "断开连接!"
上一个:asp.net 做的下载功功能虚拟路径不对
下一个:ASP分析器错误消息: “WebApplication13.Site1”不扩展类...