Issue wiht .ExecuteQUery

Discussion of open issues, suggestions and bugs regarding LinqConnect – Devart's LINQ to SQL compatible ORM
Post Reply
edstaffin
Posts: 43
Joined: Mon 13 Oct 2008 13:23

Issue wiht .ExecuteQUery

Post by edstaffin » Mon 18 Oct 2010 16:17

Hi, I have a simple class defined below and I am trying to do a db.ExecuteQuery but am having trouble.

Here is the code I am trying to run:

Dim sSql As String = "Select IT_Request_Seq, Title, Cost_Center_Name, Requested_By, Total_Score, Request_Year, Status_Name from V_IT_Request Where UPPER(Status_Name) = 'PENDING' ORDER BY Title"

Dim qry As IEnumerable(Of RequestSearchResults) = db.ExecuteQuery(Of RequestSearchResults)(sSql)

Code: Select all

    Private Class RequestSearchResults
        Public Property IT_Request_Seq As Int32
        Public Property Title As String
        Public Property Cost_Center_Name As String
        Public Property Requested_By As String
        Public Property Total_Score As Decimal
        Public Property Request_Year As Int32
        Public Property Status_Name As String
    End Class
WHen I run this code I get the following error:

Field with name _IT_Request_Seq is not found in resultset.

The important thing to note is the leading underscore. Where did that come from?

Thanks ... Ed

StanislavK
Devart Team
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Post by StanislavK » Tue 19 Oct 2010 16:48

I send you a small test project, please check that it was not blocked by your mail filter. Please specify what should be changed in it to reproduce the problem, or, if possible, send us your sample. We couldn't reproduce the issue in our environment.

The table used in the sample is defined as

Code: Select all

CREATE TABLE DEPT 
(
  DEPTNO NUMBER(4),
  DNAME VARCHAR2(14),
  LOC VARCHAR2(13)
  CONSTRAINT PK_DEPT PRIMARY KEY (DEPTNO)
)

Post Reply