php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13105 COM: Unsupported variant type (ARRAY of OBJECTS)
Submitted: 2001-09-03 05:41 UTC Modified: 2001-09-23 07:15 UTC
From: chatzoulis at flashmail dot com Assigned:
Status: Closed Package: COM related
PHP Version: 4.0.6 OS: windows 2000
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
44 - 7 = ?
Subscribe to this entry?

 
 [2001-09-03 05:41 UTC] chatzoulis at flashmail dot com


Hello everybody! . . . 
the SECOND of the following two LINEs of code:


//next line successfully instanciates a COM component (of a software called "Teres")
$COMInstance = new COM("ArrowCoreAPI.AcConnection")or die("Unable to instantiate");
//...
//...
//next line should return an array of objects  (to $returnArrayOfObjects), instead it returns a boolean (to $returnArrayOfObjects)
$returnArrayOfObjects=$COMInstance->GetNodesOfType($UserType,$version);


RESULTS IN:
Warning: Unsupported variant type: 8201 (0x2009) in c:\programme\apache group\apache\htdocs\teres\login.php on line 25


Could it be that PHP doesn't support returning an array of objects (through COM)?
Is there a SOLUTION to my problem??


Thanx alot, 
Antony (Munich-Germany)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-09-23 07:15 UTC] phanto@php.net
single dimensional arrays will be supported in php 4.0.7, you'll have to wait or try to use a current snapshot.

-harald.
 [2002-02-25 10:03 UTC] gregoire at webjeff dot org
Well, i've got a similar error message (on Windows 2000) :
Unsupported variant type: 8209 (0x2011)

But on another PC with Windows 2000, it works, i don't understand. All with PHP 4.0.6. Here is the code :

$conn = new COM("ADODB.Connection") or die("Impossible de lancer ADO");
$rs = $conn->Execute("SELECT............");
$num_fields = $rs->Fields->Count();
for ($i=0; $i < $num_fields; $i++) {$fld[$i] = $rs->Fields($i);}
for ($i=0; $i < $num_fields; $i++)
	{
	$name_field=$fld[$i]->Name();
	$val_field=$fld[$i]->Value();
	echo "$val_field<br>\n";
	}
if($rs) {$rs->Close();}
if($conn) {$conn->Close();}
$rs = null;
$conn = null;

Jean-Fran?ois GAZET (France).
Please anwer me too to gregoire@webjeff.org
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 17:01:29 2024 UTC