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