error while trying to display db info
I have these 2 pages (search/display), search sends over the ID of the item which was selected, allowing me to display the selected items. I'm getting this error now, even if I hard code the data "select * from Recipe where ID = '1'", it still gives me to same error message... Any ideas as to what I'm doing wrong???
Microsoft OLE DB Provider for ODBC Drivers (0x80040E07)
[Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression.
/cookbook/display.asp, line 16
line 16 -> Set rs = db.Execute ("SELECT * FROM Recipe WHERE ID = '"&recipe_ID&"'")
<body>
<%
recipe_ID = Request.Form("recipe_name")
if (IsEmpty(recipe_ID)) = TRUE then
response.Write("")
else
Set db = Server.CreateObject("ADODB.Connection")
db.Open = "Cookbook"
Set rs = db.Execute ("SELECT * FROM Recipe WHERE ID = '"&recipe_ID&"'")
meal = rs("R_name")
category = rs("R_category")
instructions = rs("R_instructions")
ingredients = rs("R_ingredients")
picture = rs("R_picture")
end if
%>
<h1><%=meal%></h1>
<table width=100%>
<tr><td><b>Ingredients</b><br>
[list]
<%
dim arringredients
arringredients = Split(ingredients, ",")
for i=0 to UBound(arringredients)
Response.Write "<li>"&arringredients(i)&"</li>"
next
%>
</ul></td>
<td>
<img src="<%=picture%>" alt="<%=meal%>" border="0" width="200" height="200">
</td>
</tr>
</table>
<b>Instructions</b><br>
<%
Dim arrinstruct
arrinstruct = Split (instructions,":")
for j=0 to UBound(arrinstruct)
k = j+1
Response.Write("<b>Step "&k&" </b>"&arrinstruct(j)&"<br>")
next
%>
|