I have problems retrieving data from a Microsoft Access 97 database using
DBD::ODBC.
Using the code
      ...
      $sth = $dbh->prepare("SELECT table.id,table.field FROM table WHERE
(((table.field) Like \'${variable}*\'));");
      $sth->execute;
      $sth->dump_results();
      ...
leads to "0 rows" although there are many rows in the database that match
the given expression!?

First I tried somthing like
    $sth = $dbh->prepare("SELECT id,field FROM table WHERE field Like \'
${variable}*\'");
with the same result.
Looking at the SQL-code used by MS access itself (creating a query at the
MS access 97 frontend and showing the underlying SQL-code)
I tried the more complicated version above.

Why does'nt my query return data? What's going on behind the scene?

Greetings to all out there

p.s
simple queries without using the 'Like <expression>' construct do what they
are expected to do!


Reply via email to