You probably are not doing anything wrong, but check your driver.  Microsoft
has the MDAC 2.7 out, I believe and that may have a more up to date driver.

Your SQL statement is pretty plain vanilla.  If updating your driver doesn't
work, set the tracing level to 9 and post here.

Thanks,

Jeff
>
> Hi,
>
> I'm a Perl Newbie and I'm having problems trying to use DBD with my
> Visual Foxpro free tables on Win2K. Here is the code:
>
> use DBI;
> #$dbh = DBI->connect('DBI:ODBC:ESLMI04','sa','price'); # SQL 6.5
> works!!!
> $dbh = DBI->connect('DBI:ODBC:EDS2000','','') or
>  die $DBI::errstr; ; # Visual Foxpro free table,
> $sqlstatement="SELECT * FROM areatype";
> $sth = $dbh->prepare($sqlstatement);
> $sth->execute ||
>       die "Could not execute SQL statement ... maybe invalid?";
>
> while (@row=$sth->fetchrow_array)
>  { print "@row\n" };
>
> #$dbh->disconnect;
>
> It retrieves the data but I'm getting a message box "The instruction at
> 0x...(changes each execution) referenced memory at 0x0000004. Memory
> could not be written. Click on OK to terminate the program, click on
> CANCEL to debug the program."
>
> I created an identical table on M$ SQL Server 6.5 and it seems to work
> fine.
>
> Win2K Pro SP2, ODBC core version 3.520.7430.0, VFP driver 6.01.8629.01,
> DBD-ODBC 0.28, DBI 1.201
>
> What am I doing wrong?
>
> Any and all help is most appreciated!!!
>
>

Reply via email to