各位好,我刚学ASP,很多地方不懂,来请教一下
产品编号:
<select name="id" size="1">
<option value="1" selected>1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
</select>
<input type="submit" name="Submit" value="提交">
</form>
以上是表单页面
下面是处理页面
<body>
<% ID=request.form("id") /%>
<%
dim con,DBPath
set con=server.CreateObject("ADODB.Connection")
DBPath=server.MapPath("data.mdb")
con.open "driver={Microsoft Access Driver(*.mdb)};dbq="&DBPath
set rs=server.CreateObject("ADODB.Recordset")
sql="select * from data"
sql=sql & "where 产品编号 like '%"& ID &"%'"
con.execute sql
rs.open sql,con,1,3
%>
<% if not rs.eof and not rs.bof then %>
<table width="861" height="71" border="1">
<tr>
<th width="64" height="35" scope="col">产品编号</th>
<th width="61" scope="col">产品名称</th>
</tr>
<tr>
<td height="28"> <%= rs("id") %></td>
<td> <%= rs("name") %></td>
</tr>
每次浏览总是出现错误
请问我错在哪里,应该怎么改?谢谢!
[此贴子已经被作者于2007-10-10 18:52:51编辑过]