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();
}
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php