LPM: DBD-ODBC on Win32?

David Hempy hempy at ket.org
Mon Dec 20 19:11:01 CST 1999


Hi, all!  I am accessing a Visual FoxPro database from a perl script with
the DBD-ODBC DBI module.  All was going well, accessing and updating info
from my tables, ...until the errors started.

I'm not going to bog you all down with a complicated description of what
happens, but rather ask if anyone has any experience using the DBD-ODBC
module with DBI on Win32?  There are several modules that claim to be ODBC
for Win32 specifically.  My next step is to try some of these instead and
see if they work any better, but thought I would tap into the collective's
experience first.  I would really like to stick with DBI, but don't really
*have* to.  I suspect I'm doing something wrong in my program, but wouldn't
be surprised if NT or VFP's ODBC driver does something fishy that messes
with a non-Win32 ODBC perl module.

Any advice or pointers to good references?

-dave


ps.  I don't want to turn this into a "Fix my problem" whinery, but for the
morbidly curious, some of the poop follows.  I can post the program if
anyone has a driving need to get their hands dirty.

I am now consistently getting "Error: Runtime exception" for some records
during a fetchrow_array().  Other records succeed on this part, but fail
later in the same subroutine on a prepare().  Other records get through the
whole thing successfully.  Occasionally, I get Dr.Watson imposing himself
on the command window.  At one point, I got the following error, but
haven't been able to recreate it lately...it might have been from a now
extinct bug in my code:

DBD::ODBC::db do failed: [Microsoft][ODBC Visual FoxPro Driver]Syntax
error. (SQL-37000)(DBD: st_prepare/SQLPrepare err=-1) at scout.pl line 151.

The data is virtually identical and entirely program generated.  I am quite
certain it is not a data problem.

-dave

--
David Hempy
Internet Database Administrator
Kentucky Educational Television




More information about the Lexington-pm mailing list