Subject: | DBI - Access OBDC bug [SEC=UNCLASSIFIED] |
Date: | Tue, 2 Feb 2016 06:30:42 +0000 |
To: | "bug-DBD-ODBC [...] rt.cpan.org" <bug-DBD-ODBC [...] rt.cpan.org> |
From: | "SALE, Matthew" <mts [...] ansto.gov.au> |
Good Day
I have been doing some work with DBI/OBDC/ACCESS 2010
Unfortunately, some of the time when I ask for my data it ends up corrupted.
For example, the following code produces corruption...
#!perl
use strict;
use warnings;
use DBI;
use Data::Dumper;
my $dbh = DBI->connect('dbi:ODBC:Test');
my $sqlstatementExisting = "
SELECT *
FROM Table1
";
my $sth = $dbh->prepare($sqlstatementExisting);
$sth->execute # ([$name])
|| die "Could not execute SQL statement ... maybe invalid? ".$dbh->errstr;
while (my @row = $sth->fetchrow_array) {
print Dumper (@row);
}
This produces the following result...
$VAR1 = 1;
$VAR2 = 'E-6';
However, the data stored in the database is as follows...
Table1
ID
Field1
1
8.93601020357839E-06
For some reason, my data is being truncated to just the exponent values and text.
I am unsure how to fix this as it appears to be a bug in either the perl modules or hopefully not in the OBDC or ACCESS part of the code.
Matt