ASP求救,新手

来源:百度知道 编辑:UC知道 时间:2024/05/31 01:19:31
小弟近日做了一个成绩查询程序,但是怎么做都是出错!哪位大哥能给写一段代码,让我看看,我写的着段ASP为什么老是出现:Script error detected at line 15.
Source line: rs.open exec,conn,1,1
Description: ODBC 驱动程序不支持所需的属性。
什么意思啊?
这是我写的:<%
xh=request.form("xh")
set conn=server.createobject("adodb.connection")
conn.open "driver={microsoft access driver (*.mdb)};dbq="&server.mappath("cj.mdb")
exec="select * from fs where xh="&xh
set rs=server.createobject("adodb.recordset")
rs.open exec,conn,1,1
%>
<p>

欢迎你<%rs=("name")%>你的成绩如下:
</p>
<table width="757" height="58" border="1" cellpadding="0" cellspacing="0" bordercolor="#006699">
<%
do while not rs.eof
%><tr>
<td rowspan="2" align="center">序号</td>
<td rowspan="2" align=&q

个人不太喜欢用ODBC连接数据库...

改成 "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&server.mappath("cj.mdb")&";Persist Security Info=False" 试试..

rs.open exec,conn,1,3 改成3比较好...

纯属个人意见...