House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home /  Groups /  ColdFusion Talk (CF-Talk)

Followup db query question (was XML/SOAP)

  << Previous Post |  RSS |  Sort Oldest First |  Sort Latest First |  Subscribe to this Group Next >> 
Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Joe Tseng
05/19/2004 01:47 PM

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.

Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
me
05/19/2004 02:02 PM

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

Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Dave Carabetta
05/19/2004 02:27 PM

>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.

Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
me
05/19/2004 02:54 PM

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


<< Previous Thread Today's Threads Next Thread >>

Search cf-talk

May 24, 2012

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
     1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31     

Designer, Developer and mobile workflow conference