Error: Could not format node 'New' for execution as SQL.

Error: Could not format node 'New' for execution as SQL.

Postby lancewynn » Fri 23 Jan 2009 15:20

Hello,
I am using Linq2Oracle connecting to Oracle 9i

I am receiving this error when I try to append a where clause to an IQueryable.

I Have a WorkOrder base Table, and I created an inherited OperationalWorkOrder class with discriminator of WorkOrderType=1

The following linq query works:

Code: Select all
IQueryable wo = from w in context.WorkOrder
              where WoNumber == "SAL1234"
              select w as OperationalWorkOrder;
...
foreach(...)//all ok
{
}


The following fails with the above error:

Code: Select all
IQueryable wo = from w in context.WorkOrder
              select w as OperationalWorkOrder;

IQueryable SingleWO = wo.where(w => w.WoNumber == "SAL1234");

foreach(...) //Fails here.
{
}


I have been trying numerous variations on the syntax without success. I can get this to work with the base table, but when I try to use inheritance, it falls apart.

I found a reference to this error on MS forums, but they indicate it was fixed for Linq2SQL in a previous version.

Any insight into this issue would be greatly appreciated.
lancewynn
 
Posts: 1
Joined: Fri 23 Jan 2009 14:56

Postby AndreyR » Mon 26 Jan 2009 12:58

Please post me (andreyr * devart * com) the script of your DB objects.
AndreyR
Devart Team
 
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Postby AndreyR » Fri 30 Jan 2009 07:33

The problem is fixed, look forward to the next build.
AndreyR
Devart Team
 
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Postby lnu » Tue 25 Aug 2009 15:23

Hello,

I go the same error message with the latest build. It only happens when doing something like this:
Code: Select all
var data = (from r in _context.Requests
                       where r.IdOrg == agency
                       select new Cdt.ClientPortal.Dto.RequestList()
                       {
                           CdtKey = string.Format("{0}/{1}/{2}/{3}/{4}", r.Client.NomAbr, r.Annee, string.Format("{0:0000}", r.Ref), r.Ver, r.Partie)
                       }).Skip(pageStart).Take(pageSize);


It seems that doing a string.format inside the query brakes something.

best regards,

Laurent
lnu
 
Posts: 7
Joined: Tue 25 Aug 2009 15:14

Postby Shalex » Wed 26 Aug 2009 15:44

The bug with using the String.Format function computed at the client side is fixed. Look forward to the next build of dotConnect for Oracle. I will post here when it is available.
Shalex
Devart Team
 
Posts: 7839
Joined: Thu 14 Aug 2008 12:44

Postby Shalex » Fri 04 Sep 2009 14:37

The new build of dotConnect for Oracle 5.25.42 is available for download now.
It can be downloaded from http://www.devart.com/dotconnect/oracle/download.html (trial version) or from Registered Users' Area (for users with valid subscription only).
For more information, please refer to http://www.devart.com/forums/viewtopic.php?t=15737 .
Shalex
Devart Team
 
Posts: 7839
Joined: Thu 14 Aug 2008 12:44


Return to dotConnect for Oracle