[flexcoders] Re: SQL Query to populate Flex Object (CF Backend)

2006-09-15 Thread lostinrecursion
Thanks for the hint. Could you possibly just give me a simple example of a FOR XML AUTO Query? --- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote: Sure, that just looks like a couple joins. I don't do enough SQL to spit out any code but that requirement wouldn't worry me.

[flexcoders] Re: SQL Query to populate Flex Object (CF Backend)

2006-09-15 Thread Tim Hoff
Hi, XMLEXPLICIT queries tend to get very complicated. But, here is the basic T-SQL that you're looking for. -TH SELECT 1 as Tag, NULL as Parent, L.LenderID as [Lender!1!lenderID], L.LenderName as [Lender!1!lenderName], NULL as [Location!2!locationID], NULL as [Location!2!locationName], NULL as

[flexcoders] Re: SQL Query to populate Flex Object (CF Backend)

2006-09-15 Thread Tim Hoff
Or, you could do it this way: SELECT Lenders.LenderID, Lenders.LenderName,Locations.LocationID, Locations.LocationName,Contacts.ContactID, Contacts.ContactNameFROM Lenders, Locations, ContactsWHERE Lenders.LenderID = Locations.LenderIDAND Locations.LocationID = Contacts.LocationIDFOR XML AUTO

[flexcoders] Re: SQL Query to populate Flex Object (CF Backend)

2006-09-15 Thread lostinrecursion
I managed to get EXACTLY what I wanted out of FOR XML AUTO in SQL Server. I literally could not have asked for a better way. Now I'll just return the XML and in Flex reference it as ArrayCollection and boom. Done. Thanks so much to everyone who helped. Flexcoders strikes again! :) -Kenny

Re: [flexcoders] Re: SQL Query to populate Flex Object (CF Backend)

2006-09-15 Thread Paul Hastings
On 9/16/06, Tim Hoff [EMAIL PROTECTED] wrote: Or, you could do it this way: SELECT Lenders.LenderID, Lenders.LenderName, Locations.LocationID, Locations.LocationName, Contacts.ContactID, Contacts.ContactName FROM Lenders, Locations, Contacts WHERE Lenders.LenderID = Locations.LenderID AND