Page 1 of 1

ExecuteQuery

Posted: Thu 12 Jun 2014 18:32
by hepek
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?

Re: ExecuteQuery

Posted: Fri 13 Jun 2014 12:32
by MariiaI
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.

Re: ExecuteQuery

Posted: Fri 13 Jun 2014 14:31
by hepek
never mind, I figured it out.

thank you