SQL 2005 FOR XML

Posts   
 
    
Posts: 72
Joined: 11-Aug-2006
# Posted on: 04-May-2007 08:16:32   

Hello

I am using SQL server 2005 and using FOR XML

e.g. select * from dbo.category FOR XML AUTO

Can I get this data from within the LLBLGen Framework? what is the best method?

I have looked in the help but thee is nothing specific at first glance ( some stuff about xquery exclusions ) .

If would be great if you could show me some code to do this.

thanks Martin

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 04-May-2007 08:42:42   

select * from dbo.category FOR XML AUTO

Can I get this data from within the LLBLGen Framework? what is the best method?

Do you mean you want to run the above query from LLBLGen Code?

May I ask what do you need that XML for? (we might suggest a better solution)

Did you try puting this query in a Stored Procedure and returning the XML as an output parameter, and then call the SP from LLBLGen?

Posts: 72
Joined: 11-Aug-2006
# Posted on: 04-May-2007 11:49:53   

[quotenick="Walaa"]

Did you try puting this query in a Stored Procedure and returning the XML as an output parameter, and then call the SP from LLBLGen?

I think that is what I want to do... What object is best? to put it into? I want to return a heirarchy about 4 levels deep and bind it in a page. Any ideas?

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 04-May-2007 16:08:12   

The Stored Procedure may return a string containing the xml output.

For similar discussions, please check the following thread and the links enclosed there: http://www.llblgen.com/TinyForum/Messages.aspx?ThreadID=8706