Good afternoon all, I am using the Xbase module to
read foxpro 6 tables.
Everything is working fine, apart from the seek function. When I call: $stat=$database->seek($keyvalue); I get the error message: Can't locate object method "seek" via package
"Xbase" (perhaps you forgot to load "Xbase"?) at fox1.pl line 17. I’d appreciate anybody’s thoughts. (code is
below). Best regards, Ian. <Code Start> use Xbase; #These are my dbf and idx files $dbf_name = "c:\\ian\\perl
dev\\foxpro test\\table1.dbf"; $idx_name = "c:\\ian\\perl
dev\\foxpro test\\surname.IDX";
$database = new Xbase;
$database->open_dbf($dbf_name, $idx_name); #How many records are there in the table? $end=$database->lastrec; print ("There are $end records in the
database\n"); #Set my search string $keyvalue = "Robertson"; #Perform
the seek operation (Error happens here) $stat=$database->seek($keyvalue); print ("the status of the search is $stat\n"); $current_rec=$database->recno; print ("cur rec=$current_rec\n"); #Print
out the Town field print $database->get_field("TOWN"); <Code End> |