My Respect to all the Monks.
I am trying to connect Sybase 15Dev Edition to Perl v5.8.8.
I have installed the DBI module from PPM.
Tried a simple sample program (The code is attached below)
and I get the error enclosed in <Error> and </Error>:
<Error>
install_driver(Sybase) failed: Can't locate loadable object for module
+ DBD::Sybase in @INC (@INC contains: C:/Perl/site/lib C:/OTRS/Perl/si
+te/lib C:/OTRS/Perl/l
ib .) at (eval 4) line 3
Compilation failed in require at (eval 4) line 3.
Perhaps a module that DBD::Sybase requires hasn't been fully installed
at P2.pl line 10
</Error>
Program Code:
-------------
#!C:/Perl/bin -w
use lib 'C:/Perl/site/lib';
use MIME::Base64;
use DBI;
$user = "sa";
$password = "abc123";
$dbh = DBI->connect
("dbi:Sybase:server=PUNDTGYDNB1S",$user, $password) or die "Cannot Con
+nect";
$dbh->do("use pubs2");
my $SQL = "SELECT * FROM authors";
print "The query returns the following list of authors:\n";
while ($connection->FetchRow())
{
## Translate the row into something usable. In this case I am chan
+ging
## to a hash so I can use key names (CustomerID, CompanyName) rath
+er than
## integer values (0, 1). If I wanted to use integer values, I'd u
+se the
## Data() method instead of the DataHash() method.
my %dataRow = $connection->DataHash();
# print $dataRow{CustomerID} . " : " . $dataRow{CompanyName} . "\n"
+;
print $dataRow{au_id} . " : " . $dataRow{au_lname} . "\n";
}
## Closing the database connection
$connection->Close();
-----------------------------------------
Can I have some help as regards how to access Sybase on Windows XP Professional from Perl 5.8.8, please?
Kind Regards.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.