<ROOT xmlns:sql="urn:schemas-microsoft-com:xml-sql">
    <sql:query>
      SELECT     *, dbo.Orders.OrderDate AS Expr1, dbo.Orders.RequiredDate AS Expr2, dbo.Orders.ShippedDate AS Expr3
FROM         dbo.Customers INNER JOIN
                      dbo.Orders ON dbo.Customers.CustomerID = dbo.Orders.CustomerID
      FOR XML AUTO,ELEMENTS
    </sql:query>
</ROOT>
 
notice the "for xml auto, elements"
 
That will give you a properly formated xml for flex. just add it to the end of your query.
 
hope this helps
 
jason
-----Message d'origine-----
De : flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]De la part de Libby
Envoyé : lundi 20 mars 2006 18:23
À : flexcoders@yahoogroups.com
Objet : [flexcoders] Flex 1.5 - Use SQL Server SELECT FOR XML as Data Model?

Hello,
I would like to create a flat file using output from a SQL Server 2000
query "Select As XML" to use in building a datagrid during
development. However, so far Flex does not like the output because the
nodes are not closed the way Flex expects them in a Data Model.

Is there any example anywhere of how to save XML output and use it as
a data provider to a Flex control?

Thanks,
Libby






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to