注册 登录
编程论坛 ASP技术论坛

小菜鸟遇到点问题请赐教。

csjhappying 发布于 2009-09-14 18:40, 432 次点击
<%
name=request.form("name")
tel=request.form("tel")
set conn=server.createobject("adodb.connection")
conn.open "driver={microsoft access driver (*.mdb)};dbq="&server.mappath("example3.mdb")
exec="select * from guestbook where name='"+name+"' and tel="+tel
set rs=server.createobject("adodb.recordset")
rs.open exec,conn,1,1
%>
<html>
<head>
<title>无标题文档</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<%
do while not rs.eof
%><tr>
<td><%=rs("name")%></td>
<td><%=rs("tel")%></td>
<td><%=rs("message")%></td>
<td><%=rs("time")%></td>
</tr>
<%
rs.movenext
loop
%>
</table>
</body>
</html>


rs.open exec,conn,1,1

Response.Write "" & vbCrLf
Response.Write "" & vbCrLf
Response.Write "" & vbCrLf[0]Script error detected at line 6,col[0].
Description: ODBC 驱动程序不支持所需的属性。



该如何修改。。。。
2 回复
#2
sunfishy2009-09-14 19:29
"driver={driver do microsoft access (*.mdb)};data source="&server.mappath("example3.mdb")

有建立数据源了吗.   

要不然的话你就用直接的方法写.

搜索下本论坛的精华贴有..



[ 本帖最后由 sunfishy 于 2009-9-14 19:34 编辑 ]
#3
jingjing3162009-09-15 10:30
1