none
Linq to Entities Multiple Children ODAC Right Paranthesis not Found RRS feed

  • Question

  • All,

    I have the following LinqToEntities query:

    _MyEF.Table1.Include("Table2").Include("Table2.Table3").Include("Table2.Table4").Include("Table2.Table4.Table5").Include("Table2.Table4.Table6").Where(a => a.Fiel1 == 1).Load();

    When executing against Oracle (using ODAC), I'm getting the ubiquitous "Right Parenthesis Not Found" error.  So, was curious if I was doing something wrong, or if EF just isn't playing well with Oracle for this kind of query?  Is there perhaps another way to get all the child tables, and children tables of children tables, without using Lazy Loading which might work better?

    Thanks.

    Friday, October 5, 2012 9:00 PM

Answers

  • Hi Whiteheadw,

    Welcome to the MSDN forum.

    Your problem is related to a third party data provider, so I cannot reproduce your problem. I checked the following code snippet works with my SQL Server database:

    var query = _MyEF.Table1.Include("Table2").Include("Table2.Table3").Include("Table2.Table4").Include("Table2.Table4.Table5").Include("Table2.Table4.Table6").Where(a => a.Fiel1 == 1).First();

    Have a nice day.


    Alexander Sun [MSFT]
    MSDN Community Support | Feedback to us

    • Marked as answer by whiteheadw Tuesday, October 9, 2012 3:57 PM
    Tuesday, October 9, 2012 5:57 AM
  • Thank you.  Issue appears to be with non MS-SQL servers not supporting the Apply statement, which is what the above LINQ query has when translated to SQL.

    I'm not sure if this is an issue with ODAC not translating LINQ properly, or if it's MS not working with third-party vendors when developing EF, but what I ultimately had to do was load each table separately.

    • Marked as answer by whiteheadw Tuesday, October 9, 2012 3:57 PM
    Tuesday, October 9, 2012 3:56 PM

All replies

  • Hi Whiteheadw,

    Welcome to the MSDN forum.

    Your problem is related to a third party data provider, so I cannot reproduce your problem. I checked the following code snippet works with my SQL Server database:

    var query = _MyEF.Table1.Include("Table2").Include("Table2.Table3").Include("Table2.Table4").Include("Table2.Table4.Table5").Include("Table2.Table4.Table6").Where(a => a.Fiel1 == 1).First();

    Have a nice day.


    Alexander Sun [MSFT]
    MSDN Community Support | Feedback to us

    • Marked as answer by whiteheadw Tuesday, October 9, 2012 3:57 PM
    Tuesday, October 9, 2012 5:57 AM
  • Thank you.  Issue appears to be with non MS-SQL servers not supporting the Apply statement, which is what the above LINQ query has when translated to SQL.

    I'm not sure if this is an issue with ODAC not translating LINQ properly, or if it's MS not working with third-party vendors when developing EF, but what I ultimately had to do was load each table separately.

    • Marked as answer by whiteheadw Tuesday, October 9, 2012 3:57 PM
    Tuesday, October 9, 2012 3:56 PM