send null parameter to access with asp

G

gefilte

I have an asp form that has text input boxes on it in order to allow users to
query the recordset that is displayed. It uses a stored procedure in access
with [origin] as one of the parameters.

Here's the code in asp that creates and assigns the parameter:

SET OBJPARAM = OBJCOMM.CREATEPARAMETER("ORIGIN", ADVARCHAR,ADPARAMINPUT, 50)
qryparam1 = request.form("orig city")
OBJCOMM.PARAMETERS("ORIGIN") = QRYPARAM1

It works fine if someone types in the textbox a value and queries the
recordset. However, if they want to "show all", it gives an error, asking for
the object value for the parameter. How do you send a null, or "like *" value
to a stored procedure.

The criteria in my stored procedure is: 'Like "*" & [origin]'

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top