We are trying to retrieve xml data from an SQL 2000 database like so:

<cfquery name="xmltest" datasource="r52k">
        select top 10 *
        from thetable_mst
        for xml auto, elements
</cfquery>

then we would like to use the xml with cf, but it doesn't seem possible.
When we do:
<cfdump var="#xmltest#"/>

it shows a query with 4 rows all having a piece of the xml document and the
column name is
XML_F52E2B61-18A1-11D1-B105-00805F49916B

which cold fusion seem to not like (due to the '-') character.

So, of course, xmlParse(xmltest) doesn't work because it's a query, and I
cant loop over the query rows to build the document because
XML_F52E2B61-18A1-11D1-B105-00805F49916B is invalid.

Are we doing this totally wrong? I would like to just select information
form the database in a pre made xml document - any one know how to do that?
(apparently I don't)

Thanks,

Rob

http://treebeard.sourceforge.net
http://ruinworld.sourceforge.net
Scientia Est Potentia

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

Reply via email to