|
>
but note you say you don't
expect the same functionality... then you say "It doesn't work as expected". The
expectation is to run like ASP, that is where it came from. (Or
VBScript)
You're
right at the end they are similar.
> If I get a window and someone
else doesn't do it first...
That's
not my principle John since there are lots of works to do, I have to sort
them.
> Write up all the specs for me...
and I will put one together. The advantage to doing it in a CFC is you can pass
the recordset in... CF can dynamically move to any record, forward, back... etc.
A custom tag would not do this for you... tags can't be instantiated and lack
persistance. UDF's also lack persistance. Therefore a CFC seems the way to go...
unless someone has a reason to use another tool. (And please don't say
CF5!)
I
don't believe a CFC can solve the issues, but I'm sending the ready-to-use
QueryIterator CFC here. The usage of this CFC is, you can enhance
it:
<cfquery name="myQuery"
datasource="myDsn">
select description from aTable </cfquery> <cfset qi = createObject("component", "QueryIterator").init(myQuery) /> <cfset i = 0 /> <cfloop condition="qi.hasNext()"> <cfset qi.next() /> <cfset i = i + 1 /> <cfoutput>#i#. #qi.current("description")#<br /></cfoutput> </cfloop> Murat.
|
QueryIterator.cfc
Description: Binary data
