Click to See Complete Forum and Search --> : What's wrong with this query?


nordyj
May 1st, 2001, 01:27 PM
I have the following ADO line in my program:
adoRS.Open "Select Ssn From Participants Where [Full Name] Like '" & strParticipant & ",*';", adoConn


The query returns no record (adoRS.EOF = True), even though the name appears in the database. In other words, if strParticipant is 'Smith', the query does not find 'Smith, John'. Any ideas?

Thanks in advance,

Jamie Nordmeyer
Portland, OR, USA

nordyj
May 1st, 2001, 01:28 PM
Forgot to mention; the database is an Access 2.0 database (Yech, I know, but it's what I have to work with), and I'm using ADO 2.5.

d.paulson
May 1st, 2001, 01:31 PM
Any queries on an access db using 'like' uses the wildcard character '%' and not the '*'.


David Paulson

nordyj
May 1st, 2001, 01:34 PM
Hmph! Figures. What's up with that? Who ever decided to use '%' instead of '*' (which is the standard, correct?) should be fired. Oh well. Thanks for the tip. It works now.