Access database and LIKE operator in query

From: Andi (andi_at_hunter.numerikon.de)
Date: 05/06/04


Date: Thu, 6 May 2004 13:42:53 +0200

Hi,

I try to perform a query using the SQL "LIKE" operator together with
TADOQuery and TADOConnection. The database is MS Access.

The resulting SQL statement is something like
SELECT * FROM custtable WHERE custname LIKE "*smith*"

When I enter this statement directly in Access it gives the correct results.
If I send it to the Access database via ADO from my Delphi app the resultset
ist empty. No error messages, no nothing, just empty.

Why? What can I do to make the query run correctly from ADO/Delphi?
Btw: Using D7E and Office XP.

Thx
Andi



Relevant Pages

  • Re: ADO data control
    ... Another way to test your query would be to try ... instinctively think that the database is probably not normalized. ... written on the topic of normalization, and one you might like is "Database ... Then the SQL statement and the existing WHERE and ORDER BY calculations ...
    (microsoft.public.vb.controls)
  • Re: Design View
    ... Can we assume that you put your database is a "trusted" location? ... Try the query again. ... it should print the SQL statement of the query into ... The same query opens fine in design view in Access 2000. ...
    (microsoft.public.access.queries)
  • Re: Design View
    ... Someone else may be able to provide a suggestion. ... I also checked references and they seemed fine for that database, ... Okay, Bob, the query contains the reserved word DATE as a field name. ... you may be able to get the SQL statement in A2007 opening the ...
    (microsoft.public.access.queries)
  • Re: Design View
    ... If it would be any help, I could e-mail you the database. ... Switch the problem query to SQL View, ... you may be able to get the SQL statement in A2007 opening the ... The same query opens fine in design view in Access 2000. ...
    (microsoft.public.access.queries)
  • Re: Design View
    ... I also checked references and they seemed fine for that database, ... Okay, Bob, the query contains the reserved word DATE as a field name. ... you may be able to get the SQL statement in A2007 opening the ... The same query opens fine in design view in Access 2000. ...
    (microsoft.public.access.queries)