Ok, I'm pulling my hair out! I can write to my dbase files just fine, but I can't query them. I've checked permissions and all is great, as I can return a record count.
Here's my code snippet:
// Let's set our Genre Table
$tblGenres = "/data/jz_tblGenres.dbf";
// Let's define and create that table IF it doesn't exist
if (!is_file($tblGenres)){
// Now let's define this table
$def = array(
array("ID","N",255,0),
array("Genre","C",255,0),);
// Let's create the table
dbase_create($tblGenres, $def);
}
// Now let's open our table
$genreTbl = dbase_open($tblGenres,2);
// Now let's display that data
$nr = dbase_numrecords($genreTbl);
for ($i=1; $i <= $nr; $i++) {
$rec = dbase_get_record($genreTbl,$i);
}
On the line:
$rec = dbase_get_record($genreTbl,$i);
I get:
"PHP has encountered an Access Violation at 77C43A89"
This is PHP 4.3.4 on Windows XP Pro
I do know that the data is being written properly, as if I open the file in notepad it looks right (or as right as it can).
Help would be much appreciated...
Thanks,
Ross