use lib 'c:/Perl/lib/blib/lib/Bundle';
use DBI;
### Probe DBI for the installed drivers
my @drivers = DBI->available_drivers();
die "No drivers found!\n" unless @drivers; # should never happen
### Iterate through the drivers and list the data sources for
### each one
foreach my $driver ( @drivers ) {
print "Driver: $driver\n";
my @dataSources = DBI->data_sources( $driver );
foreach my $dataSource ( @dataSources ) {
print "\tData Source is $dataSource\n";
}
print "\n";
}
And here is the output:
DBD::DB2 initialisation failed: Can't locate object method "driver" via
package "DBD::DB2" at c:/Perl/site/lib/DBI.pm line 768.
Perhaps the capitalisation of DBD 'DB2' isn't right. At
C:..........dbQueryAutoBatch.pl line 33.
Not sure if DBI or DBD::DB2 arne't right or I'm just calling something
wrong. But any help would be appreciated.
Thanks,
KW
Kevin Wendt
Summer Project Intern
Cell: 612-209-2022
Email: Kevin....@wellsfargo.com
This message may contain confidential and/or privileged information. If
you are not the addressee or authorized to receive this for the
addressee, you must not use, copy, disclose, or take any action based on
this message or any information herein. If you have received this
message in error, please advise the sender immediately by reply e-mail
and delete this message. Thank you for your cooperation
Normally, you don't compile a module in the Perl install tree - you compile
it some other place and install it into the tree.
So, did you obtain a pre-compiled copy of DBD::DB2?
If so, do you have the necessary support libraries installed?
use lib 'c:/Perl/lib/blib/lib/Bundle';
I'm dubious in the extreme about this line (above).
use DBI;
>
> ### Probe DBI for the installed drivers
> my @drivers = DBI->available_drivers();
>
> die "No drivers found!\n" unless @drivers; # should never happen
>
> ### Iterate through the drivers and list the data sources for
> ### each one
> foreach my $driver ( @drivers ) {
> print "Driver: $driver\n";
> my @dataSources = DBI->data_sources( $driver );
> foreach my $dataSource ( @dataSources ) {
> print "\tData Source is $dataSource\n";
> }
> print "\n";
> }
>
>
> And here is the output:
>
> DBD::DB2 initialisation failed: Can't locate object method "driver" via
> package "DBD::DB2" at c:/Perl/site/lib/DBI.pm line 768.
>
> Perhaps the capitalisation of DBD 'DB2' isn't right. At
> C:..........dbQueryAutoBatch.pl line 33.
If you have a pre-compiled module, then I think your problem is the absence
of DB2 Connect (IIRC) or its equivalent.
If you don't have a pre-compiled module, then your problem is that you need
to compile and install it - and compile it in any directory that is not
underneath the Perl install directory hierarchy.
Not sure if DBI or DBD::DB2 arne't right or I'm just calling something
> wrong. But any help would be appreciated.
There's a chance I misinterpreting the symptoms - I'm not a DB2 expert.
--
Jonathan Leffler <jonathan...@gmail.com> #include <disclaimer.h>
Guardian of DBD::Informix - v2005.02 - http://dbi.perl.org
"I don't suffer from insanity - I enjoy every minute of it."
<snip>
> If you have a pre-compiled module, then I think your problem is the absence
> of DB2 Connect (IIRC) or its equivalent.
<snip>
The basic connectivity requirement for DBD::DB2 on all platforms is
the DB2 Runtime Client.
If you're compiling DBD::DB2 yourself, then you need the DB2
Application Development Client instead (to get the headers required
for the compile).
Both of these are a free download from
http://ibm.com/db2/udb/support/downloadv8.html.
DB2 Connect (which isn't free) is only required if you are connecting
to zSeries or iSeries servers.
Dan