what should I do If
I run the following script to test my sybase driver
#!/usr/bin/perl -w
use DBI;
# eval { $dbh->ping };
eval { DBI->trace(4) };
if ($@) {
print "DBI->trace failed: $@";
}
eval { $dbh = DBI->connect("DBI:Sybase:server=MAIL1", "Rodopi", "rodopi",
{RaiseError => 1}) };
if ($@) {
print "connection to database failed: $@";
}
exit 0;
use DBI;
# eval { $dbh->ping };
eval { DBI->trace(4) };
if ($@) {
print "DBI->trace failed: $@";
}
eval { $dbh = DBI->connect("DBI:Sybase:server=MAIL1", "Rodopi", "rodopi",
{RaiseError => 1}) };
if ($@) {
print "connection to database failed: $@";
}
exit 0;
And get the below
error:
Name "main::dbh" used only once: possible
typo at test.pl line 14.
DBI 1.13-nothread dispatch trace level set to 4
-> DBI->connect(DBI:Sybase:server=rodopi, Rodopi, rodopi, HASH(0x80cb854))
-> DBI->install_driver(Sybase) for perl=5.00503 pid=14176 ruid=0 euid=0
connection to database failed: install_driver(Sybase) failed: Can't locate DBD/Sybase.pm in @INC (@INC contains: /usr/lib/perl5/5.00503/i386-linux /usr/lib/perl5/5.00503 /usr/lib/perl5/site_perl/5.005/i386-linux /usr/lib/perl5/site_perl/5.005 .) at (eval 1) line 3.
Perhaps the DBD::Sybase perl module hasn't been fully installed,
or perhaps the capitalisation of 'Sybase' isn't right.
Available drivers: ADO, ExampleP, Multiplex, Proxy.
at test.pl line 14
-> DBI::END
<- DBI::END complete
DBI 1.13-nothread dispatch trace level set to 4
-> DBI->connect(DBI:Sybase:server=rodopi, Rodopi, rodopi, HASH(0x80cb854))
-> DBI->install_driver(Sybase) for perl=5.00503 pid=14176 ruid=0 euid=0
connection to database failed: install_driver(Sybase) failed: Can't locate DBD/Sybase.pm in @INC (@INC contains: /usr/lib/perl5/5.00503/i386-linux /usr/lib/perl5/5.00503 /usr/lib/perl5/site_perl/5.005/i386-linux /usr/lib/perl5/site_perl/5.005 .) at (eval 1) line 3.
Perhaps the DBD::Sybase perl module hasn't been fully installed,
or perhaps the capitalisation of 'Sybase' isn't right.
Available drivers: ADO, ExampleP, Multiplex, Proxy.
at test.pl line 14
-> DBI::END
<- DBI::END complete
I found that DBD/Sybase.rm located at
/usr/lib/perl5/site_perl/DBD/Sybase.pm
where I need to declare this path so
the loading can find the driver package.
thanks very much.
---------------------------------------------------------------
Thao Le Van
Software Engineer
Extramedia Viet Nam
Thao Le Van
Software Engineer
Extramedia Viet Nam
Business Origination: <http://www.extramedia.com/>
This message contains information that may
be confidential and privileged. Unless you
are the addressee (or authorized to receive
for the addressee), you may not use, copy
or disclose to anyone this message or any
information contained within this message.
If you have received the message in error,
please advise the sender by reply e-mail
and delete all copies of this message from
your system. The sender does not assume
any liability for timely, complete, virus free,
secure, error free or uninterrupted arrival of
this e-mail.
..................................................................
be confidential and privileged. Unless you
are the addressee (or authorized to receive
for the addressee), you may not use, copy
or disclose to anyone this message or any
information contained within this message.
If you have received the message in error,
please advise the sender by reply e-mail
and delete all copies of this message from
your system. The sender does not assume
any liability for timely, complete, virus free,
secure, error free or uninterrupted arrival of
this e-mail.
..................................................................
