in reply to DBD-ODBC FoxPro on Win2000

Hello,
I have not used DBD::ODBC, but i have done quite a bit of work with ither DBD drivers. In looking at the trace info provided, it appears that the fetchrow_array() call returns SQLFetch rc of 0 once, and returns data :

-> fetchrow_array for DBD::ODBC::st (DBI::st=HASH(0x1cabf7c)~0x1cabf34 +) SQLFetch rc 0 dbih_setup_fbav for 3 fields => 0x1cabef8 fetch num_fields=3 <- fetchrow_array= ( '89959' '11097840' '1237' ) 3 items at tkttest.pl + line 24.

But, the next call gets a SQLFetch rc of 100 (an error of some sort), which exists the whil loop and calls the standard DESTROY method because $sth is no longer referenced. Assuming this is just an unlucky circumstance in DBD::ODBC's xs code (which is what i would guess), adding $sth->finish() after the while loop may cause explisit object destruction and fix the error ... just a guess.


Calm begets calm

Replies are listed 'Best First'.
Re: Re: DBD-ODBC FoxPro on Win2000
by gary kuipers (Beadle) on Jul 12, 2001 at 18:21 UTC
    Thanks for the guess. Unfortunately it does not solve the problem. Here's more data: If you click "Cancel" on the windows error and go to Visual C++ you get the error:

    Unhandled exception in Perl.exe (Perl56.DLL): 0xC0000005: Access Violation