Hi,

I need to set up a DSN on the Linux machine before I can attempt to run the
following command.

dsn=dbi:ODBC:YourDSN'
How can I do so?

Example code from http://dbi.perl.org

use DBI;
use Data::Dumper;

my $dbh = DBI->connect(
'dbi:Proxy:hostname=YourMSHostName;port=1234;dsn=dbi:ODBC
:YourDSN' , 'UserId', 'PassWord', { RaiseError => 1, PrintError => 1 } ) or
die $DBI::errs tr;

my $sth = $dbh->prepare( 'select * from authors (YourTable)' );

$sth->execute;

while( $row = $sth->fetchrow_hashref ) {
print Dumper($row);
}

$sth->finish;

$dbh->disconnect;



Thank you,

Calvin


Reply via email to