PHP 4.0 Bug #6683 Updated: Cannot pass COM object as parameter to another COM object

From: Date: Wed, 18 Oct 2000 10:05:01 +0000
Subject: PHP 4.0 Bug #6683 Updated: Cannot pass COM object as parameter to another COM object
Groups: php.dev 
Request: Send a blank email to php-dev+get-35394@lists.php.net to get a copy of this message
ID: 6683 Updated by: stas Reported By: jlim@natsoft.com.my Status: Open Bug Type: COM related Assigned To: Comments: Previous Comments: --------------------------------------------------------------------------- [2000-09-12 12:21:28] jlim@natsoft.com.my This example creates a connection object to a database, creates a recordset, then assigns the connection object to the recordset using ADO com objects. <? $dbc = new COM('ADODB.Connection'); $dbc->Provider = 'MSDASQL'; $dbc->Open('NWIND'); // standard sample access database northwind $rs = new COM("ADODB.Recordset"); $rs->Open('select * from product',$dbc,3); // 3 = static cursor ?> OUTPUT ERROR MESSAGE: Warning: Invoke() failed: Exception occurred. in d:Inetpubwwwrootphpbugado.php on line 6 PHP has encountered an Access Violation at 78002D15 The error is because the COM object $dbc is passed as a parameter to $rs. I have the same code in ASP. Works fine. --------------------------------------------------------------------------- Full Bug description available at: http://bugs.php.net/?id=6683

« previous php.dev (#35394) next »