Yes we have done this (using a VFP COM object, but the idea's the same).
Your VB object needs to return an ADO recordset. This record set is viewed
as a collection by CF. You can loop through it with CF and do what you
need.
Looping through the recordset got very tiring very quick. So what we did was
create a custom tag called ADORS2Query. This tag takes a recordset and
returns a CF query. You can then use this query in any CF tag that accepts
a query.
So the basic idea of how we did it was:
<CFOBJECT TYPE="COM"
NAME="CustRateTemp"
CLASS="custratetempbus.custratetempbus"
ACTION="CREATE">
<!--- Set the objects INI File where it can find it's dynamic parameters
--->
<CFSET CustRateTemp.cINIFile = #APPLICATION.INIFile#>
<!--- Set the lowest and highest salesperson number to return customers for
--->
<CFSET CustRateTemp.cLowSales = #COOKIE.LowSalesNo#>
<CFSET CustRateTemp.cHighSales = #COOKIE.HighSalesNo#>
<!--- Using the object return a ADO Recordset with a list of customers --->
<CFSET loCustList = CustRateTemp.rGetCustforSales>
<!--- Convert the ADO Recordset to a CF Query --->
<cf_ADORS2Query ADORS="loCustList" QueryName="CustList">
<CFOUTPUT>
<HTML>
<snipped irrelivant code>
<CFIF NOT IsDefined("CustList")>
<SPAN STYLE="font-weight: bold;">
This salesperson has no customers. Please select a
different
salesperson by clicking the button below.
</SPAN>
<CFELSE>
<CFSELECT NAME="SelectedCust"
SIZE="10"
MESSAGE="You MUST select a customer."
QUERY="CustList"
VALUE="custno"
DISPLAY="correspond"
REQUIRED="Yes"></CFSELECT>
</CFIF>
<snipped more>
</html>
</CFOUTPUT>
</cf_StripWhitespace>
Hope this helps!
______________________________________________________
Bill Grover
Supervisor IS Department Phone: 301.424.3300 x396
EU Services, Inc. FAX: 301.424.3300 x1396#
649 North Horners Lane E-Mail: mailto:[EMAIL PROTECTED]
Rockville, MD 20850-1299 WWW: www.euservices.com
______________________________________________________
> -----Original Message-----
>
> Date: Mon, 1 May 2000 15:14:04 -0700
> From: "Shannon Hall" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Subject: VB COM Examples
> Message-ID: <[EMAIL PROTECTED]>
>
> Examples,
> I am looking for examples of com implementation for
> coldfusion. I am
> working on a com object in VB, which has methods for
> returning a string for
> the coldfusion tags, this works fine. What I am looking for
> now is a way to
> return a resultset, or a collection for colfusion to loop
> through. Has
> anyone done this? Alaires site makes no referrence to it,
> although it does
> say it supports com implenetation.
> Shannon
>
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.