Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access_asp thread: sql query works inside Access but not in asp script


Message #1 by "Joel Silva" <e0126763@s...> on Mon, 2 Dec 2002 10:41:54
Hi, 

if I execute the following query inside Access, some records are found:

"SELECT number FROM EINZEL WHERE familienname_laufer LIKE 'a*' ORDER BY
number DESC"

But, the same script inside the asp returns nothing. There is no error
displayed, but the recordset is empty. 

Any ideas?

Thank you in advance
Joel
Message #2 by "Paulo Fernandes" <paulofernandes@c...> on Mon, 2 Dec 2002 10:55:34 -0000
Hi,

Try to use % for a wildcard, instead of *, thus:

"SELECT number FROM EINZEL WHERE familienname_laufer LIKE 'a%' ORDER BY
number DESC"

HTH

Paulo Fernandes
Consernet, Lda.
www.consernet.com
Telefone: +xxx xxx xxx xxx
Telem=F3vel: +xxx xxx xxx xxx
Fax: +xxx xxx xxx xxx
------------------------------------------------------------------------
---
Este e-mail =E9 confidencial. Se voc=EA n=E3o =E9 o destinat=E1rio 
pretendido
deste
e-mail,n=E3o dever=E1 usar qualquer informa=E7=E3o nele contida. Se 
recebeu este
e-mail por erro, envie-o para administrador@c...,
apagando-o de seguida.

This email is confidential. If you are not the intended recipient, you
must
not disclose or use the information contained in it. If you have
received
this mail in error, please forward it to administrador@c... and
delete the document.




-----Original Message-----
From: Joel Silva [mailto:e0126763@s...]
Sent: segunda-feira, 2 de Dezembro de 2002 10:42
To: Access ASP
Subject: [access_asp] sql query works inside Access but not in asp
script

Hi,

if I execute the following query inside Access, some records are found:

"SELECT number FROM EINZEL WHERE familienname_laufer LIKE 'a*' ORDER BY
number DESC"

But, the same script inside the asp returns nothing. There is no error
displayed, but the recordset is empty.

Any ideas?

Thank you in advance
Joel


Message #3 by "Joel Silva" <e0126763@s...> on Mon, 2 Dec 2002 12:36:49
Ola Paulo Fernades, 

Maybe I it is better to write in english. Others wouldn't understand
portuguese! 

I tried to use the wildcard %, but Access didn't accept it. After reading
some online tutorials, I figured that the wildcard % (that works fine in
SQL server or MySQL) is actually * in MS Access.

But thanks for your time!

Joel

PS: coincidencia encontrar um portugues nos forums.
Message #4 by "Paulo Fernandes" <paulofernandes@c...> on Mon, 2 Dec 2002 12:33:42 -0000
Ol=E1 Joel !!!

You're right about the language!!!!

Anyway, I've developed some applications using % as a wildcard and was
always successful in retrieving the records from the tables on an access
database.

When you say "Access didn't accept it", what happened exactly? Is your
problem solved or not? Because I remember using * in one of my projects
and couldn't retrieve anything...

Cheers!!

PS - =C9 mesmo coincid=EAncia !!! Se precisares de alguma coisa 
relacionado
com ASP que eu possa ajudar, envia-me um mail directo, ok?

Paulo Fernandes
Consernet, Lda.
www.consernet.com
Telefone: +xxx xxx xxx xxx
Telem=F3vel: +xxx xxx xxx xxx
Fax: +xxx xxx xxx xxx
------------------------------------------------------------------------
---
Este e-mail =E9 confidencial. Se voc=EA n=E3o =E9 o destinat=E1rio 
pretendido
deste
e-mail,n=E3o dever=E1 usar qualquer informa=E7=E3o nele contida. Se 
recebeu este
e-mail por erro, envie-o para administrador@c...,
apagando-o de seguida.

This email is confidential. If you are not the intended recipient, you
must
not disclose or use the information contained in it. If you have
received
this mail in error, please forward it to administrador@c... and
delete the document.




-----Original Message-----
From: Joel Silva [mailto:e0126763@s...]
Sent: segunda-feira, 2 de Dezembro de 2002 12:37
To: Access ASP
Subject: [access_asp] RE: sql query works inside Access but not in asp
script

Ola Paulo Fernades,

Maybe I it is better to write in english. Others wouldn't understand
portuguese!

I tried to use the wildcard %, but Access didn't accept it. After
reading
some online tutorials, I figured that the wildcard % (that works fine in
SQL server or MySQL) is actually * in MS Access.

But thanks for your time!

Joel

PS: coincidencia encontrar um portugues nos forums.


Message #5 by "Ken Schaefer" <ken@a...> on Tue, 3 Dec 2002 13:35:55 +1100
www.adopenstatic.com/faq/likequeries.asp

Cheers
Ken

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Joel Silva" <e0126763@s...>
Subject: [access_asp] RE: sql query works inside Access but not in asp
script


: Ola Paulo Fernades,
:
: Maybe I it is better to write in english. Others wouldn't understand
: portuguese!
:
: I tried to use the wildcard %, but Access didn't accept it. After reading
: some online tutorials, I figured that the wildcard % (that works fine in
: SQL server or MySQL) is actually * in MS Access.
:
: But thanks for your time!
:
: Joel
:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


  Return to Index