Might be something like this:
function grabDataRow (rs,row) {
var result = StructNew();
for (x = 1; x LTE ListLen(rs.ColumnList); x = x + 1) {
result[ListGetAt(columnList,x)] = rs[columnList][row]; //
this part might need some adjusting
}
return result;
}
- Calvin
-----Original Message-----
From: Pete Ruckelshaus [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 13, 2005 12:48 PM
To: CF-Talk
Subject: Easy way to get data from a single query row into a structure?
I'm completely rebuilding an old app, and for a variety of reasons, I
would like to "store" the data for a given record from the old
database in a field in a new table in a new database. In other words,
I'm returning a query that has 1k records and 7 columns of data per
record; I would like to grab those 7 columns of data for a single
record...
Is there a simple way to do that? I realize there is the
queryname.columnlist variable returned with cfquery, would there be an
easy way to grab that record as a single query object or structure
that I could then serialize into WDDX and store in my new table?
Thanks,
Pete
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking
application. Start tracking and documenting hours spent on a project or with a
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:202602
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54