ExecuteQuery

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
hepek
Posts: 126
Joined: Thu 07 Jul 2011 13:59

ExecuteQuery

Post by hepek » Thu 12 Jun 2014 18:32

hi,

I have a peace of code like this:

Code: Select all

var documents = DB.ExecuteQuery<EdgarDocumentView>(sql);
if query returns 0 rows I get "Object reference not set to an instance of an object." error.

how can I go around?

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: ExecuteQuery

Post by MariiaI » Fri 13 Jun 2014 12:32

We couldn't reproduce this issue with the latest build of LinqConnect 4.4.519 (dotConnect for Oracle 8.4.181) using this sample:

Code: Select all

 DataContext DB = new DataContext();
 string sql = @"select * from ""Orders"" where ""OrderID"" = 10"; //returns 0 rows
 var documents = DB.ExecuteQuery<Order>(sql);
Thus, please specify the following information:
- the LinqConnect version;
- the Oracle server version;
- the definition of the EdgarDocumentView entity class and the DDL/DML scripts of the necessary database table;
- the full stack trace of the error you are getting, etc.;

If possible, please send us a test project, with which the error is reproducible, so that we could investigate it in more details and find the solution for you in a shortest time.

hepek
Posts: 126
Joined: Thu 07 Jul 2011 13:59

Re: ExecuteQuery

Post by hepek » Fri 13 Jun 2014 14:31

never mind, I figured it out.

thank you

Post Reply