Attached is the .xls database that I was using. Also, I checked, and
this search works in versions 1.09 - v 1.11. I have test failures in v
1.12 - v 1.13 (03_execute_dbd.t, and 07_case.t). I have no test failures
in install of v1.14.
Here is some code that exposes the error, and shows the record when it
is actually retrieved:
#! /usr/bin/perl
use strict;
use DBI;
use DBD::Excel;
use SQL::Statement;
use Data::Dumper;
# Database file
my $filename = "./PropertyDatabase2.xls";
# Create the database handle
my $dbh = DBI->connect("DBI:Excel:file=$filename", undef, undef,
{xl_ignorecase => 0})
or die "Cannot connect: " . $DBI::errstr;
# Set the search criteria
my $unit = "#15";
my $property = " Campus Pointe Apartments";
my $sql = q~SELECT * FROM Sheet1 WHERE Unit LIKE ? AND PropertyName LIKE ?~;
# This search fails
my $rec = $dbh->selectrow_hashref($sql, '', ("\%$unit\%", "\%$property\%"));
print Dumper($rec);
# Change unit value
$unit = "1";
# This search works
$rec = $dbh->selectrow_hashref($sql, '', ("\%$unit\%", "\%$property\%"));
print Dumper($rec);
[JZUCKER - Wed Jun 8 13:10:11 2005]:
Show quoted text> Hi Steven,
>
> [guest - Wed Jun 8 11:50:11 2005]:
>
> > Parsing error occured when using SQL::Statement v1.14 with
> DBD::Excel.
> > Intermittently not returning records that are being correctly
> > searched, and exsist inthe database. Backing down to version 1.09
> > fixed the error. I have not tried any other versions.
> >
> > Thanks,
> > Steven
>
> Could you email me some sample queries? I have no similar reports and
> can't debug without some examples of things that don't work. Thanks.