I try to access DBF files (FoxPro DBF). 
Using ODBC with System DSN

    my $attr = {
        PrintError=>1,
        AutoCommit=>0
    };
    my $dbf_dbh = DBI->connect("dbi:ODBC:$system_dsn_name", '', '', $attr) or
        die "Cannot connect to " . $system_dsn_name . "\nError:" . $DBI::errstr;

   my $sel_cmd = "select count(*) from " . $table_name;
   my @dbf_res = $dbf_dbh->selectrow_array($sel_cmd);

The program crashes when it comes up to the last row in the code. The message in the 
command prompt is:

DBD::ODBC::db selectrow_array failed: [Microsoft][ODBC Driver Manager] Program t
ype out of range (SQL-S1003)(DBD: describe/SQLBindCol err=-1) at D:\work\test_pr
e\test2.pl line 121.
And the perl interpreter crash with message 
        perl.exe has generated errors and will be closed by Windows. You will need to 
restart the program.

Using ADO with System DSN
it produces this output:

Use of uninitialized value in null operation at D:/Perl/site/lib/DBI.pm line 535
..
DBD::ADO::db STORE failed:  at D:/Perl/site/lib/DBI.pm line 535.
 does not exist in hash
Can't use an undefined value as an ARRAY reference at D:/Perl/site/lib/DBD/ADO.p
m line 1467.
Issuing rollback() for database handle being DESTROY'd without explicit disconne
ct().
Connection open, destroy at D:\work\test_pre\test2.pl line 0

Thanx for any help

Reply via email to