Bug with nested queries

Bug with nested queries

Postby dilbert » Wed 26 May 2010 11:35

After upgrading to the latest version (dotConnect for MySQL 5.80.140) some our queries run into exception.

Please, try the following scenario:

Code: Select all
var list1 = from t1 in DB.Table1
                select new { t1.Id, t1.Column1 };

foreach (var row in list1)

If Column1 in first table is nullable (e.g. int?) and the value in database is NULL then the first iteration cycle throws exception 'Specified cast is not valid' after the first iteration. If the nested query is omitted, the query executes correctly.
These queries worked properly in previous versions.
Posts: 68
Joined: Tue 28 Apr 2009 10:11

Postby AndreyR » Fri 28 May 2010 10:14

I have just tried to reproduce the problem using simple tables and failed. Could you please send us (support * devart * com, subject "LINQ: Specified cast is not valid") a small test project illustrating the problem?
Please include the script of the DB object used in the project and some sample data to reproduce the problem on.
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Return to LinqConnect (LINQ to SQL support)