SQL Query with OPTION (maxrecursion 0)

Posts   
 
    
dannyyy
User
Posts: 5
Joined: 07-Feb-2011
# Posted on: 12-Sep-2011 17:00:57   

Hi,

I've defined a view with a recursive CTE query. Unfortunately the average deep of the recursion is about 180. Is there a way to define the option as part of the LINQ query or to configure it in the LLBLGen GUI?

Or is to use a SqlCommand the only way to go?

Kind regards, Danny

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 12-Sep-2011 17:30:49   

Try the following:

1- Derive from DataAccessAdapter. 2- Override OnFetchTypedView. 3- The first parameter (IRetrievalQuery) has the Command object (DBCommand). 4- Try appending the Option to it. 5- Use the derived class when needed, to fetch a TypedView with the Option required.