|
Mailing Lists
|
Home /
Groups /
ColdFusion Talk (CF-Talk)
Followup db query question (was XML/SOAP)
I'm going to ditch using DOM and create my XML using a bunch of CFSETJoe Tseng 05/19/04 01:47 P On Wed, 19 May 2004 13:44:38 -0400 (EDT), "Joe Tseng"me 05/19/04 02:02 P >I'm going to ditch using DOM and create my XML using a bunch of CFSETDave Carabetta 05/19/04 02:27 P On Wed, 19 May 2004 14:25:35 -0400, "Dave Carabetta"me 05/19/04 02:54 P I'm going to ditch using DOM and create my XML using a bunch of CFSET calls in a query loop. That said, is there any way that I can dynamically determine the names of the recordset column names? My DBA just told me there are changes coming down the pike and I don't want to change my code for every change in the tables. I was thinking of something akin to Form.fieldnames/Form[field] for web forms. Thx for the help... -- Joe Tseng Give a man a fish, he owes you one fish. Teach a man to fish, you give up your monopoly on fisheries. On Wed, 19 May 2004 13:44:38 -0400 (EDT), "Joe Tseng" wrote: > I'm going to ditch using DOM and create my XML using a > bunch of CFSET > calls in a query loop. That said, is there any way > that I can dynamically > determine the names of the recordset column names? My > DBA just told me > there are changes coming down the pike and I don't want > to change my code > for every change in the tables. I was thinking of > something akin to > Form.fieldnames/Form[field] for web forms. What type of database are you using? Some databases have the ability to return queries as XML. M$SQL 2K has the "for xml" options and Oracle (I think) has something similar... just thought I'd throw that out there. Your looking for the query meta data btw that may help with your seaching. I've done it before but I dont have the code handy (here at work) so I am a bit useless on that front. O CH3 H3C || / \ / \ N N \/ | | // //\ / \ // O N N | CH3 http://treebeard.sourceforge.net http://ashpool.sourceforge.net >I'm going to ditch using DOM and create my XML using a bunch of CFSET >calls in a query loop. That said, is there any way that I can dynamically >determine the names of the recordset column names? My DBA just told me >there are changes coming down the pike and I don't want to change my code >for every change in the tables. I was thinking of something akin to >Form.fieldnames/Form[field] for web forms. > You can simply use queryName.ColumnList to get the column names returned in the set. Regards, Dave. On Wed, 19 May 2004 14:25:35 -0400, "Dave Carabetta" wrote: > >I'm going to ditch using DOM and create my XML using a > bunch of CFSET > >calls in a query loop. That said, is there any way > that I can dynamically > >determine the names of the recordset column names? My ----- Excess quoted text cut - see Original Post for more ----- Jezz I feel like a moron. I was mixing up getting the type (varchar etc) with the name :-/ good call Dave Embarrassingly, Rob O CH3 H3C || / \ / \ N N \/ | | // //\ / \ // O N N | CH3 http://treebeard.sourceforge.net http://ashpool.sourceforge.net
|
May 24, 2012
|
Latest Fusion Authority Articles
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||