add four new functions:
 
- boolean isFirst()
- boolean isLast()
- void first()
- void last()
 
I'll stop commenting.
 
Regards,
Murat.

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Murat Demirci
Sent: Wednesday, February 23, 2005 10:06 PM
To: [email protected]
Subject: RE: [CFCDev] query object

> 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.
---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com). An archive of the CFCDev list is available at www.mail-archive.com/[email protected]

Reply via email to