>I have seen a lot of good discussions concerning parameter queries in
> Access2000 and how to pass parameters from forms in ASP. I have tried
[quoted text clipped - 65 lines]
>
> What am I doing wrong?
Nothing to do with your problem, but you should really try to wean yourself
off this horrid Dreamweaver generated ADO code. For one thing, Dreamweaver
seems to push you to using the deprecated ODBC driver (if your error message
is anyting to go by).
Try this, which will shortcut most of the bloat produced by DW, and also
remove the need to delimit the parameter values (which is where I believe
your problem arises)
<%
dim measure, param_minvalue
'Don't initialise them to empty strings
if Request("measurement")<>"" then measure = Request("measurement")
if Request("minvalue")<>"" then param_minvalue = Request("minvalue")
'Request.Form? Request.QueryString? Specify.
Set conn = Server.CreateObject("ADODB.Connection")
connString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
Server.Mappath("path_to_database")
Set rs = Server.CreateObject("ADODB.Recordset")
conn.Open connstring
conn.query_test_parameter measure, param_minvalue, rs
%>
Your resultset will be returned in the recordset rs.
If you want to use other than the default cursors (for paging through a
disconnected recordset, eg) you can do so before passing the recordset as
the final parameter to the saved query.
--
Mike Brind
Mike Brind - 29 Jan 2007 22:09 GMT
>> However, if I change the row of
>>
[quoted text clipped - 11 lines]
>>
>> What am I doing wrong?
One other thing, param_minvalue is never going to be null.
<% param_minvalue="" %>
stops it being null. It now has a value - that of an empty string.