Ken, I think you have a solution - QueryRowToStruct...
.pjf
Doug Keen wrote:
QueryRowToStruct http://www.cflib.org/udf.cfm?ID=358
On Thu, 13 Jan 2005 17:04:29 -0500, Peter J. Farrell
<[EMAIL PROTECTED]> wrote:
----------------------------------------------------------Ken,
I'm sure you could find a UDF at cflib.org that could do a QueryToStructofStructures or QueryToArrayOfStructures. But, if you wanted to get only one row from a query object, I'm sure you could write yourself a nice little UDF that could take a query and using a the columnlist attribute of the query to generate a structure (even a query with 1 row if you prefer) of that one row.
Best, .PJF MaePub
Ken Ingle wrote:
While looping over it, using cfloop, and yes on the record count :-), I'll put together an example tonight and send it. But I am thinking I need to find a way to pass the specific row I want to the cfc instead of the whole query. I am having little luck finding how to do that on a whole row.
On Thu, 13 Jan 2005 22:31:19 +0100, Trond H. Bendiktsen <[EMAIL PROTECTED]> wrote:
show us the code! :-)
i'm a little confused when you say that the "CFC then loops over the query and passed the query to a function". does it pass the query to a function after having looped over it, or while looping over it? do you loop through the query using cfloop, or cfoutput?
also, you say that - in the "final" cfc - "If I dump query.currentrow, it shows the correct row number in the database". i assume that by this you mean that dumping the query.recordCount variable shows the correct number of rows in the recordset...?
anyway: think we (at least i) need to see the code
mvh >> thb/cf --------------------------------------- <ponderthis> Why is it drug addicts and computer afficionados are both called users? </ponderthis> ---------------------------------------
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ken Ingle Sent: Thursday, January 13, 2005 9:51 PM To: [email protected] Subject: [CFCDev] Query Current Row Bug....
I am having a problem.
I have a query that is being returned to a CFC, that CFC then loops over the query and passes the query to a function. The function then calls another CFC (passing the query with it) that builds an object.
When the query gets passed to that last CFC it is losing its cursor. If I dump query.currentrow, it shows the correct row number in the database, but it will not use the current rows data to build the object, only the first row.
Has anybody run into this problem before?
-- Ken Ingle KICWEB Design [EMAIL PROTECTED] http://www.kicweb.com http://www.kicweb.com/blog ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' in the message of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported by Mindtool, Corporation (www.mindtool.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' in the message of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported by Mindtool, Corporation (www.mindtool.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' in the message of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported by Mindtool, Corporation (www.mindtool.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' in the message of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported by Mindtool, Corporation (www.mindtool.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' in the message of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported by Mindtool, Corporation (www.mindtool.com).
An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
