ADO & ODBC , for experts only

From: Date: Wed, 21 Aug 2002 04:17:08 +0000
Subject: ADO & ODBC , for experts only
Groups: php.windows 
Request: Send a blank email to php-windows+get-15403@lists.php.net to get a copy of this message
This code works partially only on the 1st on 2nd Execute comand runs well the 3rd one return the error Warning: Invoke() failed: Exceção. Source: Microsoft OLE DB Provider for ODBC Drivers Description: [Microsoft][ODBC Visual FoxPro Driver]Command contains unrecognized phrase/keyword. in But all codes are the same , the unique diference is the lenght of the str_repeat function. Anybody know what must be changed to also the 3rd execute comand works? <? $dbc = new COM("ADODB.Connection") or die ("connection create fail"); $dbc->Provider = "MSDASQL"; $dbc->Open("FoxDatabase"); $RSet = new COM("ADODB.Recordset"); $RSet = $dbc->Execute("UPDATE catalogo SET RAZAO_SOCI = 'Carlis tester', ". " OBSERVACOE=' enviadas as observacoes".time().str_repeat('A',10)."', ". " REQUISITAN = time() ". " WHERE KEYUNICA = 5574"); $RSet = $dbc->Execute("UPDATE catalogo SET RAZAO_SOCI = 'Carlis tester', ". " OBSERVACOE=' enviadas as observacoes".str_repeat('A',200)."', ". " REQUISITAN = time()". " WHERE KEYUNICA = 5575"); $RSet = $dbc->Execute("UPDATE catalogo SET RAZAO_SOCI = 'Carlis tester', ". " OBSERVACOE=' enviadas as observacoes".str_repeat('A',300)."', ". " REQUISITAN = time()". " WHERE KEYUNICA = 5576"); $RSet = $dbc->Execute("select * from catalogo Where RAZAO_SOCI = 'Carlis tester'"); while (!$RSet->EOF){ echo $RSet->fields["KEYUNICA"]->value.' ' ; echo $RSet->fields["RAZAO_SOCI"]->value.' ' ; echo $RSet->fields["REQUISITAN"]->value ; echo $RSet->fields["OBSERVACOE"]->value ; echo '<BR>'; $RSet->movenext(); } $RSet->close; $dbc->close; $RSet = null; $dbc = null; ?>

« previous php.windows (#15403) next »