John, cool stuff indeed. Do you have the SOAP toolkit 2.0 or 3.0 installed on the server? Does it matter?
Adam. > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Sunday, June 08, 2003 7:38 PM > To: CF-Talk > Subject: SQLXML > > > Just a quick note for anyone who hasn't gotten a chance to play with > MSSQL SQLXML yet, here is snippet showing how to get SQL Server to > return XML to CF. > > The MS SOAP Toolkit and SQLXML both need to be installed on the server > before this will work. > > > <cfquery datasource="northwind" name="xml"> > SELECT Customers.CustomerID, Orders.OrderID, Customers.ContactName > FROM Customers, Orders > WHERE Customers.CustomerID = Orders.CustomerID > FOR XML AUTO > </cfquery> > > <cfset column = xml.columnList> > > <cfset xmlStr = ''> > <cfloop from="1" to="#xml.recordCount#" index="i"> > <cfset xmlStr = xmlStr & xml[column][i]> > </cfloop> > > <root> > <cfoutput>#xmlStr#</cfoutput> > </root> > > > That's it...piece of cake. The only weird things are the name of the > column that is returned by default is a bit odd, so I had to work > around that, and multiple records are returned representing one xml > document so they need to be concatenated. > If anyone has any info on how to change that or why that is, I'm all > ears. > > -- > mailto:[EMAIL PROTECTED] > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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 Host with the leader in ColdFusion hosting. Voted #1 ColdFusion host by CF Developers. Offering shared and dedicated hosting options. www.cfxhosting.com/default.cfm?redirect=10481 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4