Passing an ADO Recordset by Reference

From: Date: Wed, 26 May 2004 13:17:24 +0000
Subject: Passing an ADO Recordset by Reference
Groups: php.db 
Request: Send a blank email to php-db+get-34563@lists.php.net to get a copy of this message
Does anyone know how to pass an ADO Recordset by reference to a COM object member function in PHP v4.3.6? eg. This is my best guess... dies horribly :( $AComObject = new COM("AServer.AObject"); $AADORecordSet = new COM("ADODB.Recordset"); // I wrap the ADO Recordset as a Variant... read on Zend that I have to do this, syntax is probably wrong $rAADORecordSet = new VARIANT($AADORecordSet, VT_DISPATCH | VT_BYREF); // The following function takes a reference to an ADO Recordset object as a parameter $AComObject->AFunction($rAADORecordSet); while (!$AADORecordSet->EOF) { echo $AADORecordSet->Fields["Field1"]->value . "<br>"; $AADORecordSet->MoveNext(); }

« previous php.db (#34563) next »