Access code won't work in ASP 3.0

R

Rick Brandt

Dave said:
I am trying to use the ADO recordset filter on an Access 2003 database from an
ASP 3.0 web page.

This filter works...
rs.filter="keywordid Like '12'"

...but these do not...

rs.filter="keywordid Like '*'"
'rs.filter="keywordid In (1,2,12)"

Different wild card in ADO...
rs.filter="keywordid Like '%'"

Values are apparently strings rather than numeric...
rs.filter="keywordid In ('1','2','12')"
 
R

Rick Brandt

Dave said:
Thanks for the prompt response Rick

But your syntax does not work either. I still get...

Arguments are of the wrong type, are out of acceptable range, or are in
conflict with one another.

I fail to understand how this can work...
rs.filter="keywordid Like '12'"

....and this not...
rs.filter="keywordid In ('1','2','12')"
 
D

Dave

I am trying to use the ADO recordset filter on an Access 2003 database from
an ASP 3.0 web page.

This filter works...
rs.filter="keywordid Like '12'"

....but these do not...

rs.filter="keywordid Like '*'"
'rs.filter="keywordid In (1,2,12)"

They work in Access but not in ADO.

In ADO they produce the following error...
"Arguments are of the wrong type, are out of acceptable range, or are
in conflict with one another."

Is this an inherent limitation in ADO or am I doing something wrong?
 
R

Rick Brandt

Dave said:
Thanks Rick

It's really not working.

I cut and pasted the two filters below into my ASP page. I commented the
"IN" out and it ran fine. I uncommented "IN" and commented the "LIKE" out and
it failed with the error I mentioned previously.

Could it have something to do with the cursor type?

I am using .cursorlocation=3 'adUseClient

Sorry, I'm really not that familiar with ADO and ASP. I have just seen enough
posts to know that in ADO (in Access) the % is used as a wildcard instead of *
and assumed that this was the root cause of your problem. I only commented
about the IN() clause because of the error reported and the fact that your
successful filter has quotes around the value and your original IN() clause did
not.
 
D

Dave

Thanks for the prompt response Rick

But your syntax does not work either. I still get...

Arguments are of the wrong type, are out of acceptable range, or are in
conflict with one another.
 
D

Dave

Thanks Rick

It's really not working.

I cut and pasted the two filters below into my ASP page. I commented the
"IN" out and it ran fine. I uncommented "IN" and commented the "LIKE" out
and it failed with the error I mentioned previously.

Could it have something to do with the cursor type?

I am using .cursorlocation=3 'adUseClient
 
D

David W. Fenton

I am trying to use the ADO recordset filter on an Access 2003
database from an ASP 3.0 web page.

This filter works...
rs.filter="keywordid Like '12'"

...but these do not...

rs.filter="keywordid Like '*'"
'rs.filter="keywordid In (1,2,12)"

They work in Access but not in ADO.

In ADO they produce the following error...
"Arguments are of the wrong type, are out of acceptable
range, or are
in conflict with one another."

Is this an inherent limitation in ADO or am I doing something
wrong?

This isn't an Access question, because you aren't using Access at
all, only Jet through the ADO provider in ASP. Try an ASP or ADO
newsgroup.
 
D

deanna morrison

Different wild card in ADO...
rs.filter="keywordid Like '%'"

Values are apparently strings rather than numeric...
rs.filter="keywordid In ('1','2','12')"
Hey my name is deanna
 
L

Larry Linson

Rick;

yeah no shit you don't know ADO and ASP.

you're a DAO / MDB leper.
you really should lose the training wheels; kids


the bottom line is that Access SQL needs to be rewritten to work in the
ASP world; and this is YET ANOTHER REASON TO NOT USE MDB FOR ANYTHING.

I can reuse my SQL Server / Access DAta Project queries without a
problem.
it's called 'Code Reuse'

Lose the training wheels; kids-- MDB is DED and so is DAO

-Larry Linson Jr
ADP Nationalist
 
L

Larry Linson

dont' you just need to use the '%' clause instead of the asterix for
ADO?

and I would be more picky on how you use Single Quotes..
and also.. you shoudln't ever make a field named 'id' that isn't
numeric; because Access creates on index on a field named 'id' by
default.. and indexing text is close to lunacy

Larry Linson Jr
ADP Nationalist
 
J

John Vinson

dont' you just need to use the '%' clause instead of the asterix for
ADO?

Fraudulent (but in this case actually useful, thanks Aaron) post, not
from Larry Linson.

John W. Vinson[MVP]
 

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