Re: WDDX for row of a query
Ray I *think* this is the reason (never totally sure what I'm doing!): Actually am setting up a varying number of forms (depending on the query row), each would have same fields but different values, and submit button label based on the query row. User selects appropriate button and the corresponding queryrow packet is sent to processing page. In responding to you and thinking, I am guessing that I could make this one form, with one wddx packet (or put query in a form field), then select the query row on processing page based on which submit button is sent. Do this by the QueryRow2Struct or Q of Q. Seems like regardless the method, I either have to do the selecting of the appropriate row prior on the form template or later on the processing template. For some reason, for this application, *seems* like it might be more effecient to do the sorting first. Interesting about CF, there are often several ways to approach, and one criterion is effeciency (coding or processing). For this application, I'd say it's probably a wash. For others, however, I think sending the total query would be best. Thanks for stimulating my thought! Keith - Original Message - From: "Raymond Camden" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Monday, February 03, 2003 1:17 PM Subject: RE: WDDX for row of a query > Just curious - but what you are doing in your form that makes you _have_ > to use N packets for the query? Are you sure you simply can't serialize > the whole query into one form field? It won't make _that_ big of a > difference in terms of speed, but I'm curious. > > === > Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc > - [This E-mail scanned for viruses by declude AntiVirus Software] ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: WDDX for row of a query
Just curious - but what you are doing in your form that makes you _have_ to use N packets for the query? Are you sure you simply can't serialize the whole query into one form field? It won't make _that_ big of a difference in terms of speed, but I'm curious. === Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc Email: [EMAIL PROTECTED] WWW : www.camdenfamily.com/morpheus Yahoo IM : morpheus "My ally is the Force, and a powerful ally it is." - Yoda > -Original Message- > From: E. Keith Dodd [mailto:[EMAIL PROTECTED]] > Sent: Monday, February 03, 2003 11:48 AM > To: CF-Talk > Subject: Re: WDDX for row of a query > > > Update on query row: > > For the time being, at least, I used a UDF from the library: > QueryRowToStruct(), which did what I wanted. > > > > > > > > Thanks forum for the help in getting me ontrack! > > Keith > > - Original Message - > From: "E. Keith Dodd" <[EMAIL PROTECTED]> > To: "CF-Talk" <[EMAIL PROTECTED]> > Sent: Monday, February 03, 2003 11:26 AM > Subject: Re: WDDX for row of a query > > > > Thanks Mark, Ray, Pascal > > > > I hadn't realize the nature of the Query results compared > to a usual > > structure. > > > > Tried the Q of Q, both before serializing/sending and > after. That will > work. > > Need to investigate, however, whether the additional queries and > > serialization is worth it versus just doing all hidden fields. Will > > look at some UDF's to see if anything there can help. At > least now I > > know what I am dealing with so can continue. Thanks! > > > > > - > [This E-mail scanned for viruses by declude AntiVirus Software] > > ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: WDDX for row of a query
Update on query row: For the time being, at least, I used a UDF from the library: QueryRowToStruct(), which did what I wanted. Thanks forum for the help in getting me ontrack! Keith - Original Message - From: "E. Keith Dodd" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Monday, February 03, 2003 11:26 AM Subject: Re: WDDX for row of a query > Thanks Mark, Ray, Pascal > > I hadn't realize the nature of the Query results compared to a usual > structure. > > Tried the Q of Q, both before serializing/sending and after. That will work. > Need to investigate, however, whether the additional queries and > serialization is worth it versus just doing all hidden fields. > Will look at some UDF's to see if anything there can help. > At least now I know what I am dealing with so can continue. > Thanks! > - [This E-mail scanned for viruses by declude AntiVirus Software] ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: WDDX for row of a query
Thanks Mark, Ray, Pascal I hadn't realize the nature of the Query results compared to a usual structure. Tried the Q of Q, both before serializing/sending and after. That will work. Need to investigate, however, whether the additional queries and serialization is worth it versus just doing all hidden fields. Will look at some UDF's to see if anything there can help. At least now I know what I am dealing with so can continue. Thanks! Keith - Original Message - From: "Pascal Peters" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Monday, February 03, 2003 10:49 AM Subject: RE: WDDX for row of a query > Unfortunatly a Query is stored as a structure of arrays instead of an > array of structures. So you can't get a single record with that > notation. You can do a Query of Query or build a Record using Query > functions. You could also pass the data as a serialized structure. > > -Original Message- > From: E. Keith Dodd [mailto:[EMAIL PROTECTED]] > Sent: maandag 3 februari 2003 16:34 > To: CF-Talk > Subject: WDDX for row of a query > > > Want to send distinct rows of a query via hidden form containing a WDDX > packet, rather than all the data in bunch of hidden forms. > > Have query qFolders that works fine, giving say 3 rows of data. If > cfdump query, all is fine. Am then looping through query, hoping to send > row 1's packet via form 1, row 2's via form 2, etc. Tried to do a cfdump > of each row, to see if I'm getting the right stuff before do WDDX. > > > > > > http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: WDDX for row of a query
Unfortunatly a Query is stored as a structure of arrays instead of an array of structures. So you can't get a single record with that notation. You can do a Query of Query or build a Record using Query functions. You could also pass the data as a serialized structure. -Original Message- From: E. Keith Dodd [mailto:[EMAIL PROTECTED]] Sent: maandag 3 februari 2003 16:34 To: CF-Talk Subject: WDDX for row of a query Want to send distinct rows of a query via hidden form containing a WDDX packet, rather than all the data in bunch of hidden forms. Have query qFolders that works fine, giving say 3 rows of data. If cfdump query, all is fine. Am then looping through query, hoping to send row 1's packet via form 1, row 2's via form 2, etc. Tried to do a cfdump of each row, to see if I'm getting the right stuff before do WDDX. http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: WDDX for row of a query
You can't serialize one row of a query in one step. You would probably want to make a temporary struct and serialize that. Any reason why you can't simply serialize the ENTIRE query as form.query? === Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc Email: [EMAIL PROTECTED] WWW : www.camdenfamily.com/morpheus Yahoo IM : morpheus "My ally is the Force, and a powerful ally it is." - Yoda > -Original Message- > From: E. Keith Dodd [mailto:[EMAIL PROTECTED]] > Sent: Monday, February 03, 2003 9:34 AM > To: CF-Talk > Subject: WDDX for row of a query > > > Want to send distinct rows of a query via hidden form > containing a WDDX packet, rather than all the data in bunch > of hidden forms. > > Have query qFolders that works fine, giving say 3 rows of > data. If cfdump query, all is fine. Am then looping through > query, hoping to send row 1's packet via form 1, row 2's via > form 2, etc. Tried to do a cfdump of each row, to see if I'm > getting the right stuff before do WDDX. > > > > > > http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: WDDX for row of a query
Hi Keith The wddx packet will be defined on a single query (not row in a query). If you have a query with three rows and really want to break it into three wddx packets then you'll need to get three different queries. Queries don't break apart into individual rows very easily... if you cfdump the entire query you'll see that a query is a struct containing arrays, where each array is a single column from the query. To get a single row you need one entry from each of the column arrays. The easiest thing to do would be to put the entire (three row) query into a single wddx packet and change you program to deal with that. Next easiest would be to find a way to make query objects that have only the one row you want in them... You could requery the db, or maybe use query-of-query, or construct a query "by hand" in code using the functions built for that (QueryAdd something or other, I don't recall off hand). Mark -Original Message- From: E. Keith Dodd [mailto:[EMAIL PROTECTED]] Sent: Monday, February 03, 2003 10:34 AM To: CF-Talk Subject: WDDX for row of a query Want to send distinct rows of a query via hidden form containing a WDDX packet, rather than all the data in bunch of hidden forms. Have query qFolders that works fine, giving say 3 rows of data. If cfdump query, all is fine. Am then looping through query, hoping to send row 1's packet via form 1, row 2's via form 2, etc. Tried to do a cfdump of each row, to see if I'm getting the right stuff before do WDDX. http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
WDDX for row of a query
Want to send distinct rows of a query via hidden form containing a WDDX packet, rather than all the data in bunch of hidden forms. Have query qFolders that works fine, giving say 3 rows of data. If cfdump query, all is fine. Am then looping through query, hoping to send row 1's packet via form 1, row 2's via form 2, etc. Tried to do a cfdump of each row, to see if I'm getting the right stuff before do WDDX. http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4