Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

LIKE operator works in MS Access but not ASP called stored query?

0 views
Skip to first unread message

Gary Milczarek

unread,
Nov 24, 2002, 3:49:59 PM11/24/02
to
The following MS Access 2002 SP1 query (qrySelectDeleteTasks)
returns expected results:
SELECT ID, TaskID
FROM tbl_Projects
WHERE TaskID LIKE "04.01.01.01*"

When I call the query from an ASP 3.0 page like this:
strSQL = "EXEC qrySelectDeleteTasks"
oRS.Open strSQL, MyCon, adOpenKeyset, adLockOptimistic
no records are returned.

If I replace the WHERE clause with:
WHERE TaskID = "04.01.01.01"
then I get the single record in Access and also through my ASP web page.

So does this mean the LIKE oporator *cannot* be used with ASP and MS Access?

Has anyone succeeded in using the LIKE operator with MS Access and ASP?

BIG thanks for any help. This is driving me nuts.


Bob Lehmann

unread,
Nov 24, 2002, 6:33:11 PM11/24/02
to
Use % instead of *.

Bob Lehmann

"Gary Milczarek" <gm...@starband.net> wrote in message
news:#8aUzq$kCHA.2412@tkmsftngp12...

J. Paul Schmidt

unread,
Nov 28, 2002, 2:34:40 AM11/28/02
to
Perhaps use % instead of * as the wildcard character in a like SQL statement.

Best regards,
J. Paul Schmidt - Freelance ASP Web Developer
www.Bullschmidt.com - To put live data on the Web...

0 new messages