ID: 15205 Comment by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: No Feedback Bug Type: COM related Operating System: WIN2000 SP2 German PHP Version: 4.1.1 New Comment:
similar problem when trying to update a recordset (win98/pws/access2000db/php 4.2.3) PHP fails with illegal operation error when trying to update the disconnected recordset //////////////////////////////////////////////// # to disconnect a recordset it must be created explicitly $DB_RS = new COM("ADODB.Connection") or die("Cannot start ADO"); $DB_RS->Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" . realpath($DB_Path)); $rstemp= new COM("ADODB.Recordset") or die("Cannot create Recordset"); $rstemp->cursorlocation=3; $rstemp->Open ($SQL,$DB_RS,2,1,0) ; # this line below disconnects the recordset $DB_RS =null; $rstemp->MoveFirst(); while (!$rstemp->EOF) { if ($rstemp->fields["Categories_ID"]->value==null) { $rstemp->Fields[0]->value=null; $rstemp->Update; }//end if $rstemp->MoveNext(); }//end while Previous Comments: ------------------------------------------------------------------------ [2002-02-28 00:00:04] [EMAIL PROTECTED] No feedback was provided for this bug for over a month, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". ------------------------------------------------------------------------ [2002-01-27 10:24:13] [EMAIL PROTECTED] could you add '()' to all of your method calls. your script seems very odd this. ------------------------------------------------------------------------ [2002-01-24 09:19:41] [EMAIL PROTECTED] <? $Source="c:\user.smd"; $conn=new COM("ADODB.Connection") or die("Cannot start ADO"); $record=new COM("ADODB.Recordset") or die("Cannot start ADO"); $conn->Provider = "Microsoft.Jet.OLEDB.4.0"; $conn->ConnectionString = "Data Source=$Source"; $conn->Mode=3; $conn->Open(); $SQL2="select * from FILES where FILE_ID=2"; $record->Open($SQL2,$conn,3); $record->MoveLast; $test=$record->Fields("FILE_NAME"); $test->Value="test"; /** Warning: PropPut() failed: Ausnahmefehler aufgetreten. Source: ADODB.Field Description: Das Objekt oder der Provider kann den angeforderten Vorgang nicht ausführen. in D:\Linux\neu.php on line 20 **/ $record->Update; $record->Requery; $record->Close; ?> WHY ?? -_Th.Weisbach ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=15205&edit=1