in reply to Question about DBI and PPM/DB Driver Verify Code

OK...going back to my original question. Maybe, I should have specified which OS I was on. I'm on a Win NT 4.0 system. I go the dll problem fixed, now I'm getting a bunch of other errors. Could someone point out the syntax mistake....I've been looking at this all day.

Here are the error messages

Driver: ADO

Use of uninitialized value in method lookup at datasources.pl line 12.

Use of uninitialized value in substitution (s///) at C:/Program Files/Perl/lib/AutoLoader.pm line 41.

Can't locate auto/DBI/.al in @INC (@INC contains: C:/Program Files/Perl/lib C:/Program Files/Perl/site/li b .) at datasources.pl line 12

Once again here is the code. A bit of a change.

#!/usr/bin/perl -w use DBD::ODBC; my @drivers = DBI->available_drivers(); die "No drivers found!\n" unless @drivers; foreach $driver (@drivers) { print "Driver: $driver\n"; @DataSources = DBI->$data_sources( $driver ); foreach $data_sources( @DataSources ) { print "\tdata_source is $data_sources\n"; } print "\n"; } exit;
Thanks in advance.
Curtisb

Replies are listed 'Best First'.
Re: Re: Question about DBI and PPM/DB Driver Verify Code
by buckaduck (Chaplain) on Nov 30, 2001 at 00:53 UTC
    I think you mean:
    DBI->data_sources( $driver );
    rather than:
    DBI->$data_sources( $driver );
    Note the dollar sign. As usual, your typo would have been obvious if only you would use strict;

    buckaduck

      Thanks! That was it!

      Thanks agian,
      Curtisb