> > 
> > Use of uninitialized value in concatenation (.) or string at
> > /usr/lib/perl5/site_perl/5.6.1/i686-linux/DBI.pm line 584. DBI 
> > connect('testviagamb','Fred',...) failed:  at ./con.pl line 6
> 
> $drh->errstr is returning undef:
> 
> >     >> connect     DISPATCH (DBI::dr=HASH(0x81bb28c) rc2/3 
> @5 g0 ima1
> > pid#32637) at
> /usr/lib/perl5/site_perl/5.6.1/i686-linux/DBI.pm line 582
> >     -> connect for DBD::ODBC::dr (DBI::dr=HASH(0x81bb28c)~0x80fd0a8
> > 'doesnotexist' 'Fred' **** HASH(0x81858d8))
> >     <- connect= undef at
> > /usr/lib/perl5/site_perl/5.6.1/i686-linux/DBI.pm line 582
> 
> No error has been recorded on the driver handle.
> 
> >     >> errstr      DISPATCH (DBI::dr=HASH(0x81bb28c) rc2/3 
> @1 g0 ima4
> > pid#32637) at
> /usr/lib/perl5/site_perl/5.6.1/i686-linux/DBI.pm line 584
> >     -> errstr in DBD::_::common for DBD::ODBC::dr
> > (DBI::dr=HASH(0x81bb28c)~0x80fd0a8)
> >     <- errstr= undef at
> > /usr/lib/perl5/site_perl/5.6.1/i686-linux/DBI.pm line 584
> 
> so errstr is undef.
> 
> >     -> DESTROY for DBD::ODBC::db (DBI::db=HASH(0x818592c)~INNER)
> >          DESTROY for DBI::db=HASH(0x818592c) ignored -
> handle not initialised
> >        error: -1 '[unixODBC][Driver Manager]Data source name not
> > found, and no default driver specified (SQL-IM002)(DBD: 
> db_login/SQLConnect err=-1)'
> >     <- DESTROY= undef at
> > /usr/lib/perl5/site_perl/5.6.1/i686-linux/DBI.pm line 639 
> via ./con.pl
> > line 4
> 
> Looks like the error was recorded on the dbh that was being
> created, not the drh it was being created from.  Looks like a 
> DBD::ODBC bug.

Hmm.  I am looking to reproduce this on Windows XP and find that it looks OK
to me using Perl 5.8.0 and DBI 1.33, 1.35 and 1.37.  I get $DBI::errstr
after each connect failure.  I added a test specifically for this and found
some other connection issues when using DSN= or DRIVER= in the connect
strings, but I didn't see this connection issue.
Martin, I'm going to post the next version of DBD::ODBC shortly and would
you please let me know if you still see it?

Thanks,

Jeff




Reply via email to