php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #15205 ADODB.Recordset PropPut() failed:
Submitted: 2002-01-24 09:19 UTC Modified: 2002-02-28 00:00 UTC
Votes:3
Avg. Score:5.0 ± 0.0
Reproduced:2 of 3 (66.7%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: thomy at tuts dot nu Assigned:
Status: No Feedback Package: COM related
PHP Version: 4.1.1 OS: WIN2000 SP2 German
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: thomy at tuts dot nu
New email:
PHP Version: OS:

 

 [2002-01-24 09:19 UTC] thomy at tuts dot nu
<?
$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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-01-27 10:24 UTC] phanto@php.net
could you add '()' to all of your method calls. your script seems very odd this.
 [2002-02-28 00:00 UTC] php-bugs at lists dot php dot net
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".
 [2003-02-11 04:24 UTC] webber123456 at hotmail dot com
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
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 30 14:01:28 2024 UTC