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
?










-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to