Diego Turriaga - 2010-04-09 04:55:01
Hi! First that all sorry for my english...
- I have a server with Windows Server 2003 installed
- I'm using php v5.2.13
- I'm connecting to VFP DBF Free Tables DB using ODBC VFP6 drivers. I try with VFP OLEDB 9 driver using COM but an error say me that it isnt installed... but this is other problem.
My real problem is that when I update the content of any dbf file (data is saved correctly) the cdx index crash (I dont know explain correcty this in english... CDX files are not afected by inserts or deletes)... and any future select, updete or delete action that afects this registry cant be done without reindex the dbf file previusly.
I try to to link cdx file to Microsoft Access MDB file and use this file in my ODBC but works very slowly and Error continues...
żany idea?
Here is a partial code:
...
$nroTalon = $talonPago->Numero();
$precio = $comision->Precio();
$codcon = $comision->Curso()->Concepto();
$insert = "INSERT INTO activida VALUES 'IDIO','$alumno','$docume','$nroTalon',$ahora,'$codcon',0,$precio)";
$conVFP->Ejecutar($insert);
if ($conVFP->Error()) {
return false;
}
...
And this is my VFP class code:
public function Ejecutar($consulta) {
$this->conexion = @odbc_connect($this->DSN, $this->usuario, $this->clave);
...
$result = @odbc_exec($this->conexion, $consulta);
$this->error = ($result==false);
$i = 0;
$this->recordset = array();
if (!$this->error) {
$fila = @odbc_fetch_array($result);
while ($fila) {
foreach ($fila as $clave => $valor) {
$this->recordset[$i][$clave] = $valor;
}
$i++;
$fila = @odbc_fetch_array($result);
}
}
...
}