I have now tried DBI 1.35 and DBD::ODBC 1.06 and they were OK so this would
indicate a problem in DBI 1.35?

[EMAIL PROTECTED] DBD-ODBC-1.06]# perl -e 'use DBD::ODBC; print $DBD::ODBC::VERSION;'
[EMAIL PROTECTED] DBD-ODBC-1.06]# perl -e 'use DBI;print $DBI::VERSION;'
[EMAIL PROTECTED] DBD-ODBC-1.06]# perl x.pl 
    DBI 1.35-nothread dispatch trace level set to 2
    Note: perl is running without the recommended perl -w option
    -> DBI->install_driver(ODBC) for linux perl=5.008 pid=22473 ruid=0 euid=0
       install_driver: DBD::ODBC version 1.06 loaded from
/usr/local/lib/perl5/site_perl/5.8.0/i686-linux/DBD/ODBC.pm
    <- install_driver= DBI::dr=HASH(0x81e6a78)
    -> data_sources for DBD::ODBC::dr (DBI::dr=HASH(0x81e6a78)~0x823a300)
    <- data_sources= ( 'DBI:ODBC:sampleisamloopback' 'DBI:ODBC:vaio'
'DBI:ODBC:external' 'DBI:ODBC:web' 'DBI:ODBC:austri' 'DBI:ODBC:mcs'
'DBI:ODBC:test_oob' 'DBI:ODBC:devmaster_demo' 'DBI:ODBC:2003' 'DBI:ODBC:lb'
'DBI:ODBC:gambantein_isam' 'DBI:ODBC:mimir' 'DBI:ODBC:company'
'DBI:ODBC:msaccess' 'DBI:ODBC:test' 'DBI:ODBC:myodbc' 'DBI:ODBC:bugzilla'
'DBI:ODBC:rbugs' 'DBI:ODBC:SYBASE' 'DBI:ODBC:EASYSOFT_ISAM'
'DBI:ODBC:SAMPLE_ISAM' 'DBI:ODBC:demo' 'DBI:ODBC:join' ) [23 items] at DBI.pm
line 914
Data sources:
        DBI:ODBC:sampleisamloopback
        DBI:ODBC:vaio
        DBI:ODBC:external
        DBI:ODBC:web
        DBI:ODBC:austri
        DBI:ODBC:mcs
        DBI:ODBC:test_oob
        DBI:ODBC:devmaster_demo
        DBI:ODBC:2003
        DBI:ODBC:lb
        DBI:ODBC:gambantein_isam
        DBI:ODBC:mimir
        DBI:ODBC:company
        DBI:ODBC:msaccess
        DBI:ODBC:test
        DBI:ODBC:myodbc
        DBI:ODBC:bugzilla
        DBI:ODBC:rbugs
        DBI:ODBC:SYBASE
        DBI:ODBC:EASYSOFT_ISAM
        DBI:ODBC:SAMPLE_ISAM
        DBI:ODBC:demo
        DBI:ODBC:join

    -- DBI::END
    -> disconnect_all for DBD::ODBC::dr (DBI::dr=HASH(0x81e6a78)~0x823a300)
    <- disconnect_all= '' at DBI.pm line 642
    -> DESTROY for DBD::ODBC::dr (DBI::dr=HASH(0x823a300)~INNER)
    <- DESTROY= (not implemented) during global destruction


Martin
-- 
Martin J. Evans
Easysoft Ltd, UK
Development


On 12-Nov-2003 Tim Bunce wrote:
> On Wed, Nov 12, 2003 at 09:28:54AM -0000, Martin J. Evans wrote:
>> Hi,
>> 
>> I have:
>> 
>> [EMAIL PROTECTED] DBD-ODBC-1.06]$ perl -MDBI -e 'DBI->installed_versions'
>>   Perl            : 5.008
>>   OS              : linux
>>   DBI             : 1.38
>>   DBD::mysql      : 2.9002
>>   DBD::Sponge     : 11.09
>>   DBD::Proxy      : 0.2004
>>   DBD::ODBC       : 1.05
>>   DBD::Multiplex  : 0.9
>>   DBD::ExampleP   : 11.10
>> 
>> 
>> I was upgrading DBD::ODBC to 1.06 when tests 02simple 13 onwards failed.
>> I've
>> reduced this to the following simple perl and output:
>> 
>> use DBI;
>> 
>> my @data_sources = DBI->data_sources('ODBC');
>> print "Data sources:\n\t", join("\n\t",@data_sources),"\n\n";
>> 
>> [EMAIL PROTECTED] DBD-ODBC-1.06]$ perl x.pl 
>> Usage: DBD::ODBC::dr::data_sources(drh, attr = NULL) at
>> /usr/local/lib/perl5/site_perl/5.8.0/i686-linux/DBI.pm line 964.
> 
> sub data_sources {
>     my ($class, $driver, @other) = @_;
>     my $drh = $class->install_driver($driver);
>     my @ds = $drh->data_sources(@other);
>     return @ds;
> }
> 
> So $class would be "DBI", $driver would be "ODBC" and @other would be empty.
> So then data_sources should be called with only the $drh as a parameter
> and that shouldn't cause an error.
> 
> Could you post a level 2 trace so we can see what's going on?
> 
>> perldoc DBI appears to say:
>>          @data_sources = DBI->data_sources($driver_name, \%attr, $dbh);
>> under SYNOPSIS and:
>>              @ary = DBI->data_sources($driver);
>>              @ary = DBI->data_sources($driver, \%attr);
>> under "data_sources"
>> 
>> The above code works fine with DBI 1.13 and DBD::ODBC 0.28.
> 
> It would be more helpful if you could narrow it down to one changed
> module instead of two. Also note that although the code that's failing
> is 'in' the driver, it's actually supplied by the DBI that's installed
> at the time the driver is compiled and installed.
> 
> Tim.

Reply via email to