Error:0x80040E10 -Too few parameters. expected 1
Hi all! I have an ASP page that i've added some drop-down fields to, which then posts the data to a database.It all works fine, except when i try to retrive the data so the user can view/edit it, I get the above error message. The section containing the line (302) it refers to is below, any ideas greatly appreciated.
M.
<tr>
<td bgcolor=F0F0F0 align=right valign=top>*<B>
<%=wc_VP_Region%>
</b></td>
<td bgcolor=F0F0F0 align=left>
<select name=VP_Region size=1>
<option value="">Select a Region</option>
<%
set conntemp=server.createobject("adodb.connection")
conntemp.open myDSN
mySQL="select * from vp_region"
**This is line 302** set rstemp=conntemp.execute(mySQL)
' Check to see if any records are returned
' if none found then login fails.
If rstemp.eof then ' Check to see any cases exist
response.write "<Option>No categories found</option>"
Else
Do While rstemp.EOF <> True
' Open up a second record set and see if user has any Categories already defined
If vp_region <> "" Then
mySQL2="select * from vp_region where Customer_ID = '" & Customer_ID & "' AND region = " & rstemp("ID")
set rstemp2=conntemp.execute(mySQL2)
If rstemp2.EOF = True then ' Category not set for this customer
%>
<Option value=<%=rstemp("ID")%>>
<%=rstemp("region")%>
</option>
<%else ' Set for this customer so add selected %>
response.write <Option value=<%=rstemp("ID")%> SELECTED>
<%=rstemp("region")%>
</option>
<%End If %>
<%
' Close this record set
rstemp2.Close ' Close this record set
Else ' When Customer_ID = ""
%>
<Option value=<%=rstemp("ID")%>>
<%=rstemp("region")%>
</option>
<% End If %>
<%
rstemp.movenext
loop
End IF
rstemp.close
set rstemp=nothing
conntemp.close ' Close the connection
set conntemp=nothing
%>
</select>
</td></tr>
|