Thanks Rob!
Well I just want to get Sybase(15, Dev Edition on Windows) talk to Perl 5.6.Is there a simple method to do this?
I could make MSSQL Server talk to Perl using Win32::ODBC and the best part is no username/password was required due to Windows Authentication Mode and that can get me going.
But this is a prototype and later planting in production means its Sybase 12.5 on Unix. Somehow for Developemnt purposes, need, Sybase15 talk to Perl 5.6
I need a complete sample program.
Here is the one I used for MSSQLServer:
use Win32::ODBC;
my $DSN = "MSSQLpubsDSN";
my $connection = new Win32::ODBC($DSN);
## Check to make sure the connection is valid
if (!$connection)
{
die "Could not open connection to DSN because of [$!]";
}
my $SQL = "SELECT * FROM authors";
if($connection->Sql($SQL))
{
print "I could not execute the following statement:\n $SQL\n";
print "I encountered this error:\n";
print $connection->Error() . "\n";
## Closing the database connection
$connection->Close();
## Exiting the program
die;
}
print "The query returns the following list of authors:\n";
while ($connection->FetchRow())
{
my %dataRow = $connection->DataHash();
print $dataRow{au_id} . " : " . $dataRow{au_lname} . "\n";
}
## Closing the database connection
$connection->Close();
Edit: g0n - code tags
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.