asp_databases thread: SQL in AccessXP
Message #1 by "Thang Nguyen" <thangnh_1999@y...> on Fri, 13 Dec 2002 15:51:36
|
|
I using AccessXP for my web app.But It can't work with SQL command for
searching a book:
query = "SELECT * From books where category_id = "
query = query & category & " and Title LIKE '%" & word & "%'"
I try with SQLServer 7 and it return result exactly but in AccessXP only
return table but no results
Message #2 by "Bart" <bart.vangool@s...> on Fri, 13 Dec 2002 16:51:22 +0100
|
|
Change the % into * for Access and try again.
I believe that Access doesn't recognize the % in the like-statement.
I'm not sure but try it.
Bart
-----Oorspronkelijk bericht-----
Van: Thang Nguyen [mailto:thangnh_1999@y...]
Verzonden: vrijdag 13 december 2002 15:52
Aan: ASP Databases
Onderwerp: [asp_databases] SQL in AccessXP
I using AccessXP for my web app.But It can't work with SQL command for
searching a book:
query = "SELECT * From books where category_id = "
query = query & category & " and Title LIKE '%" & word & "%'"
I try with SQLServer 7 and it return result exactly but in AccessXP only
return table but no results
Message #3 by "Drew, Ron" <RDrew@B...> on Sat, 14 Dec 2002 16:50:08 -0500
|
|
I have used the % with AccessXP with out a problem...could it be a
reserved word causing the problem? Try putting Title in brackets
-----Original Message-----
From: Bart [mailto:bart.vangool@s...]
Sent: Friday, December 13, 2002 10:51 AM
To: ASP Databases
Subject: [asp_databases] RE: SQL in AccessXP
Change the % into * for Access and try again.
I believe that Access doesn't recognize the % in the like-statement.
I'm not sure but try it.
Bart
-----Oorspronkelijk bericht-----
Van: Thang Nguyen [mailto:thangnh_1999@y...]
Verzonden: vrijdag 13 december 2002 15:52
Aan: ASP Databases
Onderwerp: [asp_databases] SQL in AccessXP
I using AccessXP for my web app.But It can't work with SQL command for
searching a book: query =3D "SELECT * From books where category_id =3D "
query =3D query & category & " and Title LIKE '%" & word & "%'" I try
with SQLServer 7 and it return result exactly but in AccessXP only
return table but no results
---
Change your mail options at http://p2p.wrox.com/manager.asp or to
unsubscribe send a blank email to
Message #4 by "Ken Schaefer" <ken@a...> on Mon, 16 Dec 2002 12:27:51 +1100
|
|
Are you using ODBC Driver?
or OLEDB Provider?
to connect to your database. OLEDB Provider needs %:
www.adopenstatic.com/faq/likequeries.asp ODBC Driver you can use * instead.
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Thang Nguyen" <thangnh_1999@y...>
Subject: [asp_databases] SQL in AccessXP
: I using AccessXP for my web app.But It can't work with SQL command for
: searching a book:
: query = "SELECT * From books where category_id = "
: query = query & category & " and Title LIKE '%" & word & "%'"
: I try with SQLServer 7 and it return result exactly but in AccessXP only
: return table but no results
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Message #5 by Rajesh Soni <rajeshgsoni@y...> on Sun, 15 Dec 2002 22:21:34 -0800 (PST)
|
|
Try this...
Just change the "%" to "*"...
Cheers,
Rajesh
--- Ken Schaefer <ken@a...> wrote:
> Are you using ODBC Driver?
> or OLEDB Provider?
> to connect to your database. OLEDB Provider needs %:
> www.adopenstatic.com/faq/likequeries.asp ODBC Driver
> you can use * instead.
>
> Cheers
> Ken
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> From: "Thang Nguyen" <thangnh_1999@y...>
> Subject: [asp_databases] SQL in AccessXP
>
>
> : I using AccessXP for my web app.But It can't work
> with SQL command for
> : searching a book:
> : query = "SELECT * From books where category_id = "
> : query = query & category & " and Title LIKE '%" &
> word & "%'"
> : I try with SQLServer 7 and it return result
> exactly but in AccessXP only
> : return table but no results
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
|