XML document from SELECT ... FOR XML 
Author Message
 XML document from SELECT ... FOR XML

Hi,

It is possible to create a structured XML document by executing SQL like
   select a, b, c
   from  tbl1
   for xml auto ?

My ADO recordset returns a long string (appripriately tagged).  But it truncates.

Thanks for your help.



Sat, 28 Jun 2003 08:57:59 GMT  
 XML document from SELECT ... FOR XML
I believe that SQL Server 2000 will allow you to do something like this
(haven't had a chance to play with it yet).  IIS would allow this with SQL
Server 7.0 and some update trial service pack stuff.  I did play with that
about 9 months ago and it worked just like you have below.

I've seen code to automatically create a XML document from an ADO recordset
(someplace on the web).  Can't remember exactly where, but it might have
been on codeguru.com.  XML is a pretty easy format, so you might be able to
just write up a function yourself that produces a nice looking XML document.


Hi,

It is possible to create a structured XML document by executing SQL like
   select a, b, c
   from  tbl1
   for xml auto ?

My ADO recordset returns a long string (appripriately tagged).  But it
truncates.

Thanks for your help.



Sat, 28 Jun 2003 11:28:21 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Trying to append a simple XML document as a node in an XML document

2. Selecting a node from an XML document

3. Accessing XML document from a Word document

4. XML, Converting Word doc's to XML files (O'2000)

5. How to create a secure connection, send an xml msg and receive and xml response

6. Render XML+XSL into PrintDocument (not XML) ?

7. XML Newbie question, getting a value from an XML string

8. Parsing XML from an ASP page that Creates XML fails

9. checking for xml tag/xml data???

10. XML From SQL2000 (Probs with FOR XML EXPLICIT)

11. Save recordset as XML/Restore from XML?

12. Read XML using VB6 DOM 4.0 with Namespaces - See Sample XML

 

 
Powered by phpBB® Forum Software