You may want to try
"SELECT * FROM cds WHERE singer Like '%Mariah%';"
or as I doubt that you want to search only for mariah :-))
"SELECT * FROM cds WHERE singer Like \'%" + strSingerName + "%\';"
But LIKE in Access is pretty poor (for example it doesn't seem to recognize accents....)
I've set up a prototype application with Jigsaw2.0.1/servlets/JDSK2.0/JDBC:ODBC/Access97 and it works well
Hello everybody !
I have a problem using the SQL operator "Like" from a servlet,
If I use for example something like
"SELECT * FROM cds WHERE singer Like ' * Mariah * ' ; "
I want to see all the singers which name has the word 'Mariah'
it works well if I execute it inside the Access, but it doesn't
works when I try to do it from a servlet.
If I use
"SELECT * FROM cds WHERE singer Like 'Mariah';"
I only see the singers which name is exactly 'Mariah' but
I want to see "Mariah Carey" and "A. Mariah Smith" and ...
(I'm using Microsoft Access and JDBC-ODBC Bridge.)
Does anyone know how can I do it ???
Thanks in advance !
Xavier.
Luc Saint-Elie
Consultant
PICTORIS INTERACTIVE
Electronic & New Media Agency
Dauphin d'Or Intranet - Biarritz 98
Dauphin d'Argent Audiovisuel Institutionnel - Biarritz 98
Grand Prix Internet - Biarritz 97
62, rue d'Hauteville - 75010 Paris
Tel : 01 48 24 97 43 - Fax : 01 48 24 00 68
http://www.pictoris-interactive.fr
___________________________________________________________________________ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
