DBI:ODBC - Can't connect to IBM AS400 using Linux
From: Keith Carangelo (caran_at_shore.net)
Date: 11/13/03
- Next message: Jos I. Boumans: "Re: No warning when missing driver?"
- Previous message: Martin Busik: "Patch for DBI::ODBC 1.06, was "Problem with prepare""
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 13 Nov 2003 06:32:37 -0800
Hello,
I'm having trouble connecting to an AS400 using DBI under Linux.
I can connect to the database fine using isql, but in Perl I get:
Connect failed to DBI:ODBC:SICASA1: [unixODBC][IBM][iSeries Access
ODBC Driver]Missing system name needed for connection.
(SQL-HY000)(DBD: db_login/SQLConnect err=-1) at tmp.pl line 16.
My Perl Program:
----------------------------------------------
#!/usr/bin/perl -w
use DBI;
# Connect to the database through ODBC.
my ($db, $user, $pass);
$db = 'DBI:ODBC:SICASA1';
$user = 'user';
$pass = 'pass';
my $dbh = DBI->connect( $db, $user, $pass )
|| die "Connect failed to $db:$DBI::errstr";
----------------------------------------------
My odbc.ini:
----------------------------------------------
[SICASA1]
Driver = iSeries Access ODBC Driver
Description = Production AS/400 Database
Trace = no
System = SICASA1.APPN.SNA.IBM.COM
DefaultPkgLibrary = TBLKMS
UID = user
PWD = pass
----------------------------------------------
Perl is 5.6.1, DBI is 1.37, DBD:ODBC is 1.06 and the IBM
iSeries ODBC Driver is version 16 (all latest)
Thanks for your help!
Keith
- Next message: Jos I. Boumans: "Re: No warning when missing driver?"
- Previous message: Martin Busik: "Patch for DBI::ODBC 1.06, was "Problem with prepare""
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|