What is Request("SearchInput").Count?

You are creating an addressArray with the entire form variables,
Are you sure.. these are the parameters to the COM Object?

Look at the COM Object Function.. and check exactly what it requires
as parameters.

Joe Eugene



> -----Original Message-----
> From: Andres [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 03, 2003 3:24 PM
> To: CF-Talk
> Subject: Help porting ASP to CF
>
>
> Hello Everyone,
> I am in the process of porting some code from ASP to CF. The code
> interfaces with a COM object which requires an array as input
> variables and then returns several other arrays as response
> variables. I am having difficulties writing the CF code that will
> allow me to call and pass these variables and receive the right
> info accordingly.
>
> This is the ASP code that generates the Address info array the
> COM function needs:
> '***********************************************************
>   Dim asSearch, i
>   ReDim asSearch (Request("SearchInput").Count - 1)
>   for i = 1 to Request("SearchInput").Count
>     asSearch(i - 1) = Request("SearchInput")(i)
>   next
> '***********************************************************
>
> This is the cf code i wrote to do the same thing
> <!--- ************************************************* --->
> <cfset addressArray = arraynew(1)>
>       <!--- create address info array --->
> <cfset counter = 0>
> <cfloop collection="#form#" item="pointer">
> <!--- populate array with collection elements --->
>               <cfset counter = counter + 1>
>               <cfoutput>#pointer#=#evaluate(pointer)#</cfoutput>
>               <cfset addressArray[counter] = #evaluate(pointer)#>
>       </cfloop>
> <!--- ************************************************* --->
>
> The ASP code that actually executes the COM function is as follows:
> '***********************************************************
> Dim QuickAddress
>   Set QuickAddress = Server.CreateObject("QAS.QAProWeb")
>
> Dim iPotential, asPreviews, asTags, aiFlags, aiScores
>     QuickAddress.Search 0, sCountryCode, iPromptSet, asSearch,
> iPotential, asPreviews, asTags, aiFlags, aiScores
> '***********************************************************
>
> I don't really know how to call that function in the same was ASP
> does in CF. The resulting variables (asPreviews, asTags, aiFlags,
> aiScores) contain arrays of data each. How can i tell CF to run
> this function and put the right info in the right variables?
>
> thanks!
>
> andres
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to