Skip Menu |
 

This queue is for tickets about the DBD-ODBC CPAN distribution.

Report information
The Basics
Id: 61537
Status: rejected
Priority: 0/
Queue: DBD-ODBC

People
Owner: Nobody in particular
Requestors: cpanbugs [...] dseven.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in:
  • 1.23
  • 1.24_6
Fixed in: (no value)



Subject: Empty values with long column names??
Download (untitled) / with headers
text/plain 2.6k
I seem to have several problems accessing an MDB through unixODBC -> mdbtools on Ubuntu 10.4. Everything looks OK using unixODBC's "isql" utility, but various problems occur through DBD::ODBC. Picking one I can't find a workaround for as a starting point.... This query looks fine in isql: Show quoted text
SQL> select
Call,STATION_CALLSIGN,APP_DXKEEPER_LOTW_QSL_Rcvd,APP_DXKEEPER_EQSL_QSLSDATE,QSO_End from QSOs where DXCCID = '324' +---------------------------+---------------------------+---------------------------+---------------------------+---------------------+ | Call | STATION_CALLSIGN | APP_DXKEEPER_LOTW_QSL_Rcvd| APP_DXKEEPER_EQSL_QSLSDATE| QSO_End | +---------------------------+---------------------------+---------------------------+---------------------------+---------------------+ | VU2RAK | N6ML | R | 2009-09-01 00:00:00 | 2009-09-01 15:29:23 | | VU2PAI | N6ML | R | 2010-03-10 00:00:00 | 2010-03-09 16:50:52 | | VU2NKS | N6ML | Y | 2010-08-22 00:00:00 | 2010-08-21 20:38:22 | +---------------------------+---------------------------+---------------------------+---------------------------+---------------------+ SQLRowCount returns 3 3 rows fetched Show quoted text
SQL>
Using DBD::ODBC 1.23 that comes with Ubuntu and the same query statement, it seems that the columns that have long names return empty results... mini-ubuntu ~ % perl -I/usr/lib/perl5 ./getlog.pl DBD::ODBC::VERSION = 1.23 VU2RAK, N6ML, , , 2009-09-01 15:29:23 VU2PAI, N6ML, , , 2010-03-09 16:50:52 VU2NKS, N6ML, , , 2010-08-21 20:38:22 mini-ubuntu ~ % Using the latest SVN version is even worse - all fields are empty after the first row... mini-ubuntu ~ % ./getlog.pl DBD::ODBC::VERSION = 1.24_6 VU2RAK, N6ML, , , 2009-09-01 15:29:23 , , , , , , , , mini-ubuntu ~ % Here's the perl code.... mini-ubuntu ~ % cat getlog.pl #!/usr/bin/perl use DBI; use DBD::ODBC; printf "DBD::ODBC::VERSION = %s\n", $DBD::ODBC::VERSION; my $dbh = DBI->connect("dbi:ODBC:dxkmega") or die "$DBI::errstr\n"; my $sql = qq/select Call,STATION_CALLSIGN,APP_DXKEEPER_LOTW_QSL_Rcvd,APP_DXKEEPER_EQSL_QSLSDATE,QSO_End from QSOs where DXCCID = '324'/; my $sth = $dbh->prepare($sql); $sth->execute(); $sth->{RaiseError} = 1; my $rows = []; while(my $row = (shift(@$rows) || shift(@{$rows=$sth->fetchall_arrayref(undef,1)||[]}))) { print join(", ", @{$row}), "\n"; } mini-ubuntu ~ % Perl is v5.10.1 that comes with Ubuntu 10.4.
Download (untitled) / with headers
text/plain 3.5k
On Tue Sep 21 18:10:14 2010, dseven wrote: Show quoted text
> > I seem to have several problems accessing an MDB through unixODBC -> > mdbtools on Ubuntu 10.4. Everything looks OK using unixODBC's "isql" > utility, but various problems occur through DBD::ODBC. > > Picking one I can't find a workaround for as a starting point.... > > This query looks fine in isql: >
> SQL> select
>
Call,STATION_CALLSIGN,APP_DXKEEPER_LOTW_QSL_Rcvd,APP_DXKEEPER_EQSL_QSLSDATE,QSO_End Show quoted text
> from QSOs where DXCCID = '324' > +---------------------------+--------------------------- > +---------------------------+--------------------------- > +---------------------+ > | Call | STATION_CALLSIGN | > APP_DXKEEPER_LOTW_QSL_Rcvd| APP_DXKEEPER_EQSL_QSLSDATE| QSO_End > | > +---------------------------+--------------------------- > +---------------------------+--------------------------- > +---------------------+ > | VU2RAK | N6ML | R > | 2009-09-01 00:00:00 | 2009-09-01 15:29:23 | > | VU2PAI | N6ML | R > | 2010-03-10 00:00:00 | 2010-03-09 16:50:52 | > | VU2NKS | N6ML | Y > | 2010-08-22 00:00:00 | 2010-08-21 20:38:22 | > +---------------------------+--------------------------- > +---------------------------+--------------------------- > +---------------------+ > SQLRowCount returns 3 > 3 rows fetched
> SQL>
> > > Using DBD::ODBC 1.23 that comes with Ubuntu and the same query > statement, it seems that the columns that have long names return empty > results... > > mini-ubuntu ~ % perl -I/usr/lib/perl5 ./getlog.pl > DBD::ODBC::VERSION = 1.23 > VU2RAK, N6ML, , , 2009-09-01 15:29:23 > VU2PAI, N6ML, , , 2010-03-09 16:50:52 > VU2NKS, N6ML, , , 2010-08-21 20:38:22 > mini-ubuntu ~ % > > > Using the latest SVN version is even worse - all fields are empty > after > the first row... > > mini-ubuntu ~ % ./getlog.pl > DBD::ODBC::VERSION = 1.24_6 > VU2RAK, N6ML, , , 2009-09-01 15:29:23 > , , , , > , , , , > mini-ubuntu ~ % > > > > Here's the perl code.... > > > mini-ubuntu ~ % cat getlog.pl > #!/usr/bin/perl > > use DBI; > use DBD::ODBC; > > printf "DBD::ODBC::VERSION = %s\n", $DBD::ODBC::VERSION; > > my $dbh = DBI->connect("dbi:ODBC:dxkmega") or die "$DBI::errstr\n"; > > my $sql = qq/select >
Call,STATION_CALLSIGN,APP_DXKEEPER_LOTW_QSL_Rcvd,APP_DXKEEPER_EQSL_QSLSDATE,QSO_End Show quoted text
> from QSOs where DXCCID = '324'/; > > my $sth = $dbh->prepare($sql); > $sth->execute(); > > $sth->{RaiseError} = 1; > my $rows = []; > while(my $row = (shift(@$rows) || > shift(@{$rows=$sth->fetchall_arrayref(undef,1)||[]}))) { > print join(", ", @{$row}), "\n"; > } > > mini-ubuntu ~ % > > > Perl is v5.10.1 that comes with Ubuntu 10.4. > >
mdbtools is notoriously bad as an ODBC driver and I believe has not been updated since 2004. All the same I'll look into it if you can provide some further information. Please run your test script again but make the following changes first: 1. add the following to your odbcinst.ini file (run odbcinst -j to locate it): [ODBC] Trace = Yes TraceFile = /tmp/unixodbc.log 2. set DBI_TRACE=15=x.log environment variable. This should produce /tmp/unixodbc.log and an x.log file in the current working directory. Can you send those to me. I suspect this is a unicode issue. Is you DBD::ODBC built with unicode support (i.e., did you put -u on the command line when building it and does http://search.cpan.org/~mjevans/DBD-ODBC-1.24/ODBC.pm#odbc_has_unicode odbc_has_unicode return 1? Martin -- Martin J. Evans Wetherby, UK
From: bitcard [...] dseven.org
Download (untitled) / with headers
text/plain 2.2k
On Wed Sep 22 03:55:55 2010, MJEVANS wrote: Show quoted text
> On Tue Sep 21 18:10:14 2010, dseven wrote:
Show quoted text
> mdbtools is notoriously bad as an ODBC driver and I believe has not > been updated since 2004.
If you have a recommendation for an alternative that's not expensive and will work in a cygwin environment as well as on Linux (ultimate goal is to be able to run this on the Windows box with the application that generates the MDB), I'll take a look. I have other issues with DBI/DBD::ODBC in the cygwin environment, but will explore those later, if I can get something working on Linux. Show quoted text
> All the same I'll look into it if you can provide > some further information. Please run your test script again but make > the > following changes first: > > 1. add the following to your odbcinst.ini file (run odbcinst -j to > locate it): > > [ODBC] > Trace = Yes > TraceFile = /tmp/unixodbc.log > > 2. set DBI_TRACE=15=x.log environment variable. > > This should produce /tmp/unixodbc.log and an x.log file in the current > working directory. Can you send those to me.
OK, produced two pairs - one with Ubuntu's 1.23 and one with 1.24_6 that I built from source. Also included a mini-version of the MDB, if you want to try to reproduce, in the attached ZIP. Show quoted text
> I suspect this is a unicode issue. Is you DBD::ODBC built with unicode > support (i.e., did you put -u on the command line when building it and > does odbc_has_unicode return 1?
It returns 0 with both versions. I rebuilt 1.24_6 with unicode, but it doesn't appear to make any difference, other than the additional warning about max column name length being pegged... DBD::ODBC::VERSION = 1.24_6 DBD::ODBC::dr connect warning: Max column name length pegged at 512 at /usr/lib/perl5/DBI.pm line 653. odbc_has_unicode = 1 VU2NKS, N6ML, , , 2010-08-21 20:38:22 , , , , , , , , BTW, I also noticed that in the 1.24_6 case, the second and third rows are not completely empty, but are producing unprintable characters matching the length of the data... as seen through 'less'... VU2NKS, N6ML, , , 2010-08-21 20:38:22 ^@^@^@^@^@^@, ^@^@^@^@, , , ^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ ^@^@^@^@^@^@, ^@^@^@^@, , , ^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ The columns with the long names are still empty, though. Thanks for taking a look....
Subject: 61537.zip
Download 61537.zip
application/zip 35.6k

Message body not shown because it is not plain text.

Download (untitled) / with headers
text/plain 3.3k
On Wed Sep 22 12:38:09 2010, dseven wrote: Show quoted text
> On Wed Sep 22 03:55:55 2010, MJEVANS wrote:
> > On Tue Sep 21 18:10:14 2010, dseven wrote:
>
> > mdbtools is notoriously bad as an ODBC driver and I believe has not > > been updated since 2004.
> > If you have a recommendation for an alternative that's not expensive and > will work in a cygwin environment as well as on Linux (ultimate goal is > to be able to run this on the Windows box with the application that > generates the MDB), I'll take a look. I have other issues with > DBI/DBD::ODBC in the cygwin environment, but will explore those later, > if I can get something working on Linux.
I would recommend either the Easysoft MS Access ODBC driver (works on Linux and other Unix platforms) (http://www.easysoft.com/products/data_access/odbc-access-driver/index.html £475) or the Easysoft ODBC-ODBC Bridge (a generic solution not just for Access) (http://www.easysoft.com/products/data_access/odbc_odbc_bridge/index.html more expensive). However, I should tell you I work for Easysoft. If you used the Easysoft MS Access ODBC driver you can move the MDB to Linux and use that driver to access it from Linux and the MS ODBC Driver to access it from Windows/Cygwin. If you used the ODBC-ODBC Bridge you could use the same product on Linux and Windows. Show quoted text
>
> > All the same I'll look into it if you can provide > > some further information. Please run your test script again but make > > the > > following changes first: > > > > 1. add the following to your odbcinst.ini file (run odbcinst -j to > > locate it): > > > > [ODBC] > > Trace = Yes > > TraceFile = /tmp/unixodbc.log > > > > 2. set DBI_TRACE=15=x.log environment variable. > > > > This should produce /tmp/unixodbc.log and an x.log file in the current > > working directory. Can you send those to me.
> > OK, produced two pairs - one with Ubuntu's 1.23 and one with 1.24_6 that > I built from source. Also included a mini-version of the MDB, if you > want to try to reproduce, in the attached ZIP.
I will try and look at them tonight. Show quoted text
>
> > I suspect this is a unicode issue. Is you DBD::ODBC built with unicode > > support (i.e., did you put -u on the command line when building it and > > does odbc_has_unicode return 1?
> > It returns 0 with both versions. I rebuilt 1.24_6 with unicode, but it > doesn't appear to make any difference, other than the additional warning > about max column name length being pegged...
ok, that rules one set of things out. Show quoted text
> DBD::ODBC::VERSION = 1.24_6 > DBD::ODBC::dr connect warning: Max column name length pegged at 512 at > /usr/lib/perl5/DBI.pm line 653. > odbc_has_unicode = 1 > VU2NKS, N6ML, , , 2010-08-21 20:38:22 > , , , , > , , , , > > > BTW, I also noticed that in the 1.24_6 case, the second and third rows > are not completely empty, but are producing unprintable characters > matching the length of the data... as seen through 'less'... > > VU2NKS, N6ML, , , 2010-08-21 20:38:22 > ^@^@^@^@^@^@, ^@^@^@^@, , , ^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ > ^@^@^@^@^@^@, ^@^@^@^@, , , ^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ > > The columns with the long names are still empty, though. > > Thanks for taking a look.... > >
I'm not promising anything as I know from experience that the MDB tools ODBC driver is poor (at best) and I think this will just be the start of your problems. Martin -- Martin J. Evans Wetherby, UK
From: bitcard [...] dseven.org
Download (untitled) / with headers
text/plain 1.6k
On Wed Sep 22 12:47:59 2010, MJEVANS wrote: Show quoted text
> On Wed Sep 22 12:38:09 2010, dseven wrote:
> > On Wed Sep 22 03:55:55 2010, MJEVANS wrote:
> > > On Tue Sep 21 18:10:14 2010, dseven wrote:
> >
> > > mdbtools is notoriously bad as an ODBC driver and I believe has
> not
> > > been updated since 2004.
> > > > If you have a recommendation for an alternative that's not expensive
> and
> > will work in a cygwin environment as well as on Linux (ultimate goal
> is
> > to be able to run this on the Windows box with the application that > > generates the MDB), I'll take a look. I have other issues with > > DBI/DBD::ODBC in the cygwin environment, but will explore those
> later,
> > if I can get something working on Linux.
> > I would recommend either the Easysoft MS Access ODBC driver (works on > Linux and other Unix platforms) > (http://www.easysoft.com/products/data_access/odbc-access- > driver/index.html > £475) or the Easysoft ODBC-ODBC Bridge (a generic solution not just > for > Access) > (http://www.easysoft.com/products/data_access/odbc_odbc_bridge/index.html > more > expensive). However, I should tell you I work for Easysoft.
Heh. OK. £475 is at least an order of magnitude more than I'd be willing to pay, as this is for a hobby application. My current solution involves exporting the database to a flat file, and then parsing that file with the perl code. It'd be nice to not have to go through the export step every time, but not worth that much! :) It would be interesting to at least know if my script produces good output against the database I included, if you use your driver instead of mdbtools. If so, we can blame mdbtools, and I'll have to live with it. Cheers, ~Iain
From: cpan [...] dseven.org
Download (untitled) / with headers
text/plain 872b
I found this github repo where they've been applying patches to mdbtools recently... http://github.com/brianb/mdbtools This version seems to fix the long-column-name problem! But the problem with the second and third rows bring unprintable with 1.24_6 persists. I think that's a new bug in 1.24_x.... mini-ubuntu ~ % perl -I/usr/lib/perl5 ./getlog.pl DBD::ODBC::VERSION = 1.23 odbc_has_unicode = 0 VU2NKS, N6ML, Y, 2010-08-22 00:00:00, 2010-08-21 20:38:22 VU2RAK, N6ML, R, 2009-09-01 00:00:00, 2009-09-01 15:29:23 VU2PAI, N6ML, R, 2010-03-10 00:00:00, 2010-03-09 16:50:52 mini-ubuntu ~ % ./getlog.pl DBD::ODBC::VERSION = 1.24_6 DBD::ODBC::dr connect warning: Max column name length pegged at 512 at /usr/lib/perl5/DBI.pm line 653. odbc_has_unicode = 1 VU2NKS, N6ML, Y, 2010-08-22 00:00:00, 2010-08-21 20:38:22 , , , , , , , , mini-ubuntu ~ %
Download (untitled) / with headers
text/plain 781b
On Wed Sep 22 13:00:03 2010, dseven wrote: Show quoted text
> It would be interesting to at least know if my script produces good > output against the database I included, if you use your driver instead > of mdbtools. If so, we can blame mdbtools, and I'll have to live with it.
martin@bragi:~/svn/dbd-odbc/trunk/rt_data/rt61537$ perl script.pl DBD::ODBC::VERSION = 1.26_1 VU2NKS, N6ML, Y, 2010-08-22 00:00:00, 2010-08-21 20:38:22 VU2RAK, N6ML, R, 2009-09-01 00:00:00, 2009-09-01 15:29:23 VU2PAI, N6ML, R, 2010-03-10 00:00:00, 2010-03-09 16:50:52 Worked ok with our driver. I know it looks like I've got a newer DBD::ODBC but it is actually 1.25 (released this morning) but the version changed to 1.26_1 for work I'm about to do (so it is 1.25 really). Martin -- Martin J. Evans Wetherby, UK
From: bitcard [...] dseven.org
Download (untitled) / with headers
text/plain 1.5k
On Wed Sep 22 13:46:15 2010, MJEVANS wrote: Show quoted text
> On Wed Sep 22 13:00:03 2010, dseven wrote: >
> > It would be interesting to at least know if my script produces good > > output against the database I included, if you use your driver instead > > of mdbtools. If so, we can blame mdbtools, and I'll have to live
with it. Show quoted text
> > > martin@bragi:~/svn/dbd-odbc/trunk/rt_data/rt61537$ perl script.pl > DBD::ODBC::VERSION = 1.26_1 > VU2NKS, N6ML, Y, 2010-08-22 00:00:00, 2010-08-21 20:38:22 > VU2RAK, N6ML, R, 2009-09-01 00:00:00, 2009-09-01 15:29:23 > VU2PAI, N6ML, R, 2010-03-10 00:00:00, 2010-03-09 16:50:52 > > Worked ok with our driver. > > I know it looks like I've got a newer DBD::ODBC but it is actually 1.25 > (released this morning) but the version changed to 1.26_1 for work I'm > about to do (so it is 1.25 really).
Hmm, curious... I still have the unprintable problem with 1.26_1, but not with 1.23... mini-ubuntu ~ % perl -I/usr/lib/perl5 ./getlog.pl DBD::ODBC::VERSION = 1.23 odbc_has_unicode = 0 VU2NKS, N6ML, Y, 2010-08-22 00:00:00, 2010-08-21 20:38:22 VU2RAK, N6ML, R, 2009-09-01 00:00:00, 2009-09-01 15:29:23 VU2PAI, N6ML, R, 2010-03-10 00:00:00, 2010-03-09 16:50:52 mini-ubuntu ~ % perl ./getlog.pl DBD::ODBC::VERSION = 1.26_1 DBD::ODBC::dr connect warning: Max column name length pegged at 512 at /usr/lib/perl5/DBI.pm line 653. odbc_has_unicode = 1 VU2NKS, N6ML, Y, 2010-08-22 00:00:00, 2010-08-21 20:38:22 , , , , , , , , mini-ubuntu ~ % BTW, is there a way to make that "max column name length" warning go away ?
Download (untitled) / with headers
text/plain 1.7k
On Wed Sep 22 13:57:02 2010, dseven wrote: Show quoted text
> On Wed Sep 22 13:46:15 2010, MJEVANS wrote:
> > On Wed Sep 22 13:00:03 2010, dseven wrote: > >
> > > It would be interesting to at least know if my script produces good > > > output against the database I included, if you use your driver instead > > > of mdbtools. If so, we can blame mdbtools, and I'll have to live
> with it.
> > > > > > martin@bragi:~/svn/dbd-odbc/trunk/rt_data/rt61537$ perl script.pl > > DBD::ODBC::VERSION = 1.26_1 > > VU2NKS, N6ML, Y, 2010-08-22 00:00:00, 2010-08-21 20:38:22 > > VU2RAK, N6ML, R, 2009-09-01 00:00:00, 2009-09-01 15:29:23 > > VU2PAI, N6ML, R, 2010-03-10 00:00:00, 2010-03-09 16:50:52 > > > > Worked ok with our driver. > > > > I know it looks like I've got a newer DBD::ODBC but it is actually 1.25 > > (released this morning) but the version changed to 1.26_1 for work I'm > > about to do (so it is 1.25 really).
> > Hmm, curious... I still have the unprintable problem with 1.26_1, but > not with 1.23... > > mini-ubuntu ~ % perl -I/usr/lib/perl5 ./getlog.pl > DBD::ODBC::VERSION = 1.23 > odbc_has_unicode = 0 > VU2NKS, N6ML, Y, 2010-08-22 00:00:00, 2010-08-21 20:38:22 > VU2RAK, N6ML, R, 2009-09-01 00:00:00, 2009-09-01 15:29:23 > VU2PAI, N6ML, R, 2010-03-10 00:00:00, 2010-03-09 16:50:52 > mini-ubuntu ~ % perl ./getlog.pl > DBD::ODBC::VERSION = 1.26_1 > DBD::ODBC::dr connect warning: Max column name length pegged at 512 at > /usr/lib/perl5/DBI.pm line 653. > odbc_has_unicode = 1 > VU2NKS, N6ML, Y, 2010-08-22 00:00:00, 2010-08-21 20:38:22 > , , , , > , , , , > mini-ubuntu ~ % > > > BTW, is there a way to make that "max column name length" warning go
away ? Show quoted text
> >
You are comparing apples with pears as one is built with unicode and one is not. I doubt mdbtools will do unicode. Martin -- Martin J. Evans Wetherby, UK
From: bitcard [...] dseven.org
Download (untitled) / with headers
text/plain 2.1k
On Wed Sep 22 14:16:23 2010, MJEVANS wrote: Show quoted text
> On Wed Sep 22 13:57:02 2010, dseven wrote:
> > On Wed Sep 22 13:46:15 2010, MJEVANS wrote:
> > > On Wed Sep 22 13:00:03 2010, dseven wrote: > > >
> > > > It would be interesting to at least know if my script produces good > > > > output against the database I included, if you use your driver
instead Show quoted text
> > > > of mdbtools. If so, we can blame mdbtools, and I'll have to live
> > with it.
> > > > > > > > > martin@bragi:~/svn/dbd-odbc/trunk/rt_data/rt61537$ perl script.pl > > > DBD::ODBC::VERSION = 1.26_1 > > > VU2NKS, N6ML, Y, 2010-08-22 00:00:00, 2010-08-21 20:38:22 > > > VU2RAK, N6ML, R, 2009-09-01 00:00:00, 2009-09-01 15:29:23 > > > VU2PAI, N6ML, R, 2010-03-10 00:00:00, 2010-03-09 16:50:52 > > > > > > Worked ok with our driver. > > > > > > I know it looks like I've got a newer DBD::ODBC but it is actually
1.25 Show quoted text
> > > (released this morning) but the version changed to 1.26_1 for work I'm > > > about to do (so it is 1.25 really).
> > > > Hmm, curious... I still have the unprintable problem with 1.26_1, but > > not with 1.23... > > > > mini-ubuntu ~ % perl -I/usr/lib/perl5 ./getlog.pl > > DBD::ODBC::VERSION = 1.23 > > odbc_has_unicode = 0 > > VU2NKS, N6ML, Y, 2010-08-22 00:00:00, 2010-08-21 20:38:22 > > VU2RAK, N6ML, R, 2009-09-01 00:00:00, 2009-09-01 15:29:23 > > VU2PAI, N6ML, R, 2010-03-10 00:00:00, 2010-03-09 16:50:52 > > mini-ubuntu ~ % perl ./getlog.pl > > DBD::ODBC::VERSION = 1.26_1 > > DBD::ODBC::dr connect warning: Max column name length pegged at 512 at > > /usr/lib/perl5/DBI.pm line 653. > > odbc_has_unicode = 1 > > VU2NKS, N6ML, Y, 2010-08-22 00:00:00, 2010-08-21 20:38:22 > > , , , , > > , , , , > > mini-ubuntu ~ % > > > > > > BTW, is there a way to make that "max column name length" warning go
> away ?
> > > >
> > You are comparing apples with pears as one is built with unicode and one > is not. I doubt mdbtools will do unicode.
Yeah but I had this problem before I went down the unicode path, and still do... mini-ubuntu ~ % ./getlog.pl DBD::ODBC::VERSION = 1.26_1 odbc_has_unicode = 0 VU2NKS, N6ML, Y, 2010-08-22 00:00:00, 2010-08-21 20:38:22 , , , , , , , , mini-ubuntu ~ %
Download (untitled) / with headers
text/plain 474b
On Wed Sep 22 14:27:33 2010, dseven wrote: Show quoted text
> Yeah but I had this problem before I went down the unicode path, and > still do... > > mini-ubuntu ~ % ./getlog.pl > DBD::ODBC::VERSION = 1.26_1 > odbc_has_unicode = 0 > VU2NKS, N6ML, Y, 2010-08-22 00:00:00, 2010-08-21 20:38:22 > , , , , > , , , , > mini-ubuntu ~ % > >
Just to let you know I've reproduced your situation now and will look into it as soon as I can find some time. Martin -- Martin J. Evans Wetherby, UK
Download (untitled) / with headers
text/plain 1.7k
On Fri Sep 24 03:59:43 2010, MJEVANS wrote: Show quoted text
> On Wed Sep 22 14:27:33 2010, dseven wrote: >
> > Yeah but I had this problem before I went down the unicode path, and > > still do... > > > > mini-ubuntu ~ % ./getlog.pl > > DBD::ODBC::VERSION = 1.26_1 > > odbc_has_unicode = 0 > > VU2NKS, N6ML, Y, 2010-08-22 00:00:00, 2010-08-21 20:38:22 > > , , , , > > , , , , > > mini-ubuntu ~ % > > > >
> > Just to let you know I've reproduced your situation now and will look > into it as soon as I can find some time. > > Martin
I've had a quick look at this and there are a number of things wrong with mdbtools: 1. When you call SQLDriverConnect it fails to set the out connection string and out connection string length - this is a bug and can lead in DBD::ODBC to: panic: sv_setpvn called with negative strlen at blib/lib/DBD/ODBC.pm line 107. I have worked around it for now. 2. When you call SQLDescribeCol to return the column information it always returns 0 for the length of the column name and then the first chr only of the column name. This does not happen in isql because isql uses SQLColAttribute SQL_DESC_LABEL. This is another bug in mdbtools which should support SQLDescribeCol properly and I'm not going to change DBD::ODBC because calling SQLDescribeCol instead of multiple SQLColAttribute calls save a lot of time. 3. The data is returned in isql because it uses SQLGetData but DBD::ODBC binds the column data with SQLBindCol. It would seem mdbtools does not support rebinding columns after a row is fetched. The fact it works in 1.23 is a fluke. Sorry, but as I said, mdbtools is rather buggy and I'm not going to spoil DBD::ODBC by adding a load of workarounds for a basically broken driver. Martin -- Martin J. Evans Wetherby, UK


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.