i unchecked "run 2.1 odbc compatibility" and executed "select * from host". this now appears to work correctly.
heres my trivial test program:
--------------
#!c:/perl/bin/Perl.exe
use DBI; use strict;
my $dbh; my $sth; my $row; my $array_ref;
$dbh = DBI -> connect ( "dbi:ODBC:QuickBooks Data", "Programming", "Engineering1", { PrintError => 1, RaiseError => 1 } ) or die "connect failed: $DBI::errstr\n";
DBI -> trace ( 1 );
$sth = $dbh -> prepare ( "SELECT LastName FROM Customer" ) or die "prepare failed: $DBI::errstr\n";
$sth -> execute ( ) or die "execute failed: $DBI::errstr\n";
$array_ref = $sth -> fetchall_arrayref ( );
foreach $row ( @$array_ref ) { print "--->row: @$row\n"; }
$sth -> finish ( );
$dbh -> disconnect ( ) or die "disconnect failed: $DBI::errstr\n";
exit;
-----------
when i execute it, the program times out after a minute, with no results. trace(1) gives the following output:
DBI 1.53-ithread default trace level set to 0x0/1 (pid 7340) <- prepare('SELECT LastName FROM Customer')= DBI::st=HASH(0x1a5af5c) at t.pl line 83 dbd_describe failed, dbd_st_execute #2...! <- execute= -1 at t.pl line 86 <- fetchall_arrayref= [ ] row-1 at t.pl line 89 <- finish= 1 at t.pl line 102 <- disconnect= 1 at t.pl line 104 <- DESTROY(DBI::st=HASH(1a5af50))= undef <- DESTROY(DBI::db=HASH(1a5ae30))= undef <- disconnect_all= '' at DBI.pm line 700 ! <- DESTROY(DBI::dr=HASH(19ce54c))= undef during global destruction
if i execute a trace (9) and "select * from customer" it executes an sql describe statement, which returns tons of information, with the dbd_describe error message at the end.
what should i look at next?
thx - bob |