I've been trying to use PHP4's COM functions to access ADO datasources on Win32. I have been successful running queries straight off the ADO Connection object but I need (well, would strongly prefer) to be able to use parameterised queries. The problem is that I can't set the ActiveConnection property of the Command; i.e.
$ado = new COM('ADODB.Connection');
$ado->Open(<my connection string>);
$q = new COM('ADODB.Command');
$q->ActiveConnection = $ado;
...fails on the fourth line. I'm assuming this is because the ActiveConnection is being set to the PHP COM object, NOT the underlying ADO Connection object.
Is there any way around this? Is there a way to get the actual COM object referenced by a PHP COM object? Or am I doing something wrong?
Ta, Rob.
$ado = new COM('ADODB.Connection');
$ado->Open(<my connection string>);
$q = new COM('ADODB.Command');
$q->ActiveConnection = $ado;
...fails on the fourth line. I'm assuming this is because the ActiveConnection is being set to the PHP COM object, NOT the underlying ADO Connection object.
Is there any way around this? Is there a way to get the actual COM object referenced by a PHP COM object? Or am I doing something wrong?
Ta, Rob.