这是我写的一段连接access数据库的脚本,但是总报错误,不知道为什么,请高手过目指导一下,在线等~~~谢谢
<% Set lc_conn = Server.CreateObject("ADODB.Connection") Provider = "Provider = Microsoft.Jet.OLEDB.4.0;" DBPath = "Data Source = " & Server.MapPath("hf.mdb") lc_conn.Open Provider & DBPath Set lrs_rs = Server.CreateObject("ADODB.Recordset") lrs_rs.Open "user", lc_conn, Cursor, 2 Dim ls_uid if lrs_rs Is Nothing then Resphonse.Write "打开数据库失败!" Resphonse.End else ls_uid = lrs_rs('uid') end if %> <html>
<head> <meta http-equiv="Content-Language" content="zh-cn"> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <meta name="GENERATOR" content="Microsoft FrontPage 4.0"> <meta name="ProgId" content="FrontPage.Editor.Document"> <title>New Page 1</title> </head>
<body>
<p>用户名是:<%=ls_uid%></p>
</body>
</html>
报的错误是: 错误类型: Microsoft JET Database Engine (0x80040E14) /test.asp, 第 11 行