I understand what you’re saying, but I still think they can all be done now!  We use this kind of stuff all the time and have never had issues with it.

 

Want the last record?

 

myquery.mycolumnname[myquery.recordcount]

 

Want to start half way through the query?

 

for (i = myquery.recordcount / 2; i lte myquery.recordcount; i = i + 1) {

somevalue = myquery.mycolumnname[i];

}

 

Want to abort arbitrarily?

for (i = 0; i LTE myquery.recordcount; i = i + 1) {

somevalue = myquery.mycolumnname[i];

 

            if (somevalue is ‘my_matching_value’) break;

}

 

Or even better:

while (myquery.mycolumname[i] is not ‘my_matching_value) {

            doSomething();

            i = i + 1;

}

 

I guess I understand wanting to have a familiar way of iterating over data when you’re using multiple platforms, but I really don’t know anything that the ADO/.NET model has that the CF model doesn’t either!

 

Roland

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of John Farrar
Sent: Wednesday, February 23, 2005 3:54 PM
To: [email protected]
Subject: Re: [CFCDev] query object

 

John Farrar wrote:

Nothing... what they do they do good. What Murat is after is additional functionality. It's being able to first do things the way he wants. Second sometimes the step by step processing manually (automated through code without CFoutput/CFLoop) has better application. What he and I share is a desire for this functionality to be "wrapped up" into a collection of reusable logic. Sometimes you may want to start midstream in a recordset... or you may want to jump to last... or abort processing without going through the whole recordset. Now you could do this iwht the the index... but his original point does have merit. (Even if it took a few pokes to get him to admit that he wanted ASP functions in CF.) The fact that it is a visual basic type approach doesn't make it a bad one... and it is pretty easy (since I know how) to build something to allow us to do it in CFMX7... heh, and what ever previous version it runs in.

Bottom line... in CFScript... and other occasions the page logic can be simplified, streamlined and code written faster with this functionality. We aren't planning to use this where CFOutput or CFLoop is a better solution. This is more for additional granular processing control.


Roland Collins wrote:

I still don’t understand what everyone has against cfloop and cfoutput.  They even already natively support indexed rows and columns!

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Murat Demirci
Sent: Wednesday, February 23, 2005 3: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 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] ---------------------------------------------------------- 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