COM object and VARIANT

From: Date: Thu, 26 Jul 2001 16:16:19 +0000
Subject: COM object and VARIANT
Groups: php.windows 
Request: Send a blank email to php-windows+get-8519@lists.php.net to get a copy of this message
I want to use a COM object : 'SGMConnection' No problem if I want to send simple requests like these : $oConnection = com_load ("SGMConnection.Connection"); echo "Version = ".com_propget( $oConnection, "version" ); $sConnect = "driver={SQL Server};server=MTBFAB4;database=Suivi;Trusted_Connection=Yes;APP=AQ;"; echo com_propput( $oConnection, "ConnectString",$sConnect); com_invoke( $oConnection, "connect"); print com_invoke( $oConnection, "IsConnected"); This object allows me to get informations from an SQL base. For this, in Visual Basic, I call a Variant and it works ! I wanted to do the same with PHP, but I could'nt read any value in $vSql variable, where I am supposed to get informations. Here are the test lines : $vRes = new VARIANT(); $sSql = "select pr_num from postchar where pr_lib = 'ParamClient'"; // I get the right line number ($iRes) where the reference is ('paramClient') $iRes = com_invoke( $oConnection, "Query", $vRes, $sSql ); but I have nothing in $vRes !!! How can I do to use an object who needs a Variant to write his informations ?

« previous php.windows (#8519) next »