> following instrctions from
> http://www.easysoft.com/developer/languages/perl/dbd_odbc_tuto
> rial_part_1.html#dsn_defn
> have you supplied the requested DataSource name ?
the DSN is the last part of the DBI->connect string, i.e.
dbi:ODBC:LABELPRINT. That DSN does exist, and a test connection works.
Also, if the DSN wouldn't work, I wouldn't get the table descriptions in
the ODBC trace...
> $ odbcinst -j
> unixODBC 2.2.9
> DRIVERS............: /etc/odbcinst.ini
> SYSTEM DATA SOURCES: /etc/odbc.ini
> USER DATA SOURCES..: /home/martin/.odbc.ini
> cat /home/martin/.odbc.ini
I'm on windows here, so DSN works a bit different... (but as said, the
DSN should be ok, otherwise the RaiseError and PrintError should catch
in).
I made a small testscript, just to be sure, and it also fails:
----------------------snip------------------------
use strict;
use DBI;
my $msdbh = DBI->connect("dbi:ODBC:LABELPRINT", "user", "password", {
RaiseError => 1, PrintError => 1, AutoCommit => 1 } ) or do {&myError
("$DBI::errstr");};
my $sth = $msdbh->prepare('SELECT SPEDITION,KEP FROM
LABELPRINT_SPED_IN');
$sth->execute;
while (my @row=$sth->fetchrow_array) {
print "@row\n";
}
------------------snip-----------------------
again, no error message...
Lars