Bug #16649 Updated: Wrong object type returned

From: Date: Sat, 27 Apr 2002 10:00:13 +0000
Subject: Bug #16649 Updated: Wrong object type returned
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-6213@lists.php.net to get a copy of this message
ID: 16649 Updated by: phanto@php.net Reported By: anoop_alex@hotmail.com -Status: Open +Status: Bogus Bug Type: COM related Operating System: WIN2K PHP Version: 4.1.2 New Comment: and the collection itself is an object, so nothing is wrong here. you should be able to use $clnParameter->Next() to retrieve the next element or $clnParameter->Next($clnParameter->Count()) to get an array containing all parameters Previous Comments: ------------------------------------------------------------------------ [2002-04-17 00:46:42] anoop_alex@hotmail.com I have the following code which tries to execute a stored procedure using ADODB created using COM. The ad Constants and strConnect have been defined in an include file. $objCommand = new COM ("ADODB.Command"); $objCommand -> ActiveConnection = strConnect; $objCommand -> CommandText = "someStoredProc"; $objCommand -> CommandType = adCmdStoredProc; $objParam = $objCommand -> CreateParameter("strAction", adVarChar, adParamInput, 1); $objCommand -> Parameters -> Append($objParam); $objParam = $objCommand -> CreateParameter("intCategoryID", adInteger, adParamInput, 4); $objCommand -> Parameters -> Append($objParam); $objParam = $objCommand -> CreateParameter("strCategory", adVarChar, adParamInput, 100); $objCommand -> Parameters -> Append($objParam); $clnParameter = $objCommand -> Parameters; echo gettype($clnParameter); The display says $clnParameter is an object, while ADODB documentation says "Parameters" is a collection of Parameter object. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=16649&edit=1

« previous php.bugs (#6213) next »