Query to a MS-Access 97 database using DBD::ODBC driver
From: Guenter Buehrle (Guenter.Buehrle_at_MarconiSelenia.com)
Date: 01/21/04
- Next message: Jeff Urlwin: "RE: Query to a MS-Access 97 database using DBD::ODBC driver"
- Previous message: Michael Peppler: "DBD::Sybase on MacOSX/ASE 12.5.1 (was: Re: Getting DBD-Sybase to Work)"
- Next in thread: Jeff Urlwin: "RE: Query to a MS-Access 97 database using DBD::ODBC driver"
- Maybe reply: Jeff Urlwin: "RE: Query to a MS-Access 97 database using DBD::ODBC driver"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: dbi-users@perl.org Date: Wed, 21 Jan 2004 16:57:25 +0100
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!
- Next message: Jeff Urlwin: "RE: Query to a MS-Access 97 database using DBD::ODBC driver"
- Previous message: Michael Peppler: "DBD::Sybase on MacOSX/ASE 12.5.1 (was: Re: Getting DBD-Sybase to Work)"
- Next in thread: Jeff Urlwin: "RE: Query to a MS-Access 97 database using DBD::ODBC driver"
- Maybe reply: Jeff Urlwin: "RE: Query to a MS-Access 97 database using DBD::ODBC driver"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|