Argument types do not match when map char(1) to System.Char

Discussion of open issues, suggestions and bugs regarding LinqConnect – Devart's LINQ to SQL compatible ORM
Post Reply
calfonso
Posts: 4
Joined: Mon 30 Aug 2010 16:21

Argument types do not match when map char(1) to System.Char

Post by calfonso » Fri 15 Oct 2010 20:31

Hello,
I'm testing a trial version of LinqConnect and I get a System.ArgumentException when I have a nullable char(1) column in any table.

To reproduce this you need:
1- create a table in a sqlSever
CREATE TABLE [dbo].[TestTable](
[Id] [int] IDENTITY(1,1) NOT NULL,
[Status] [char](1) NULL)

2- generate a new DataContext with this table;
3- Run any query like this one:
{
DataContextSql dataContext = new DataContextSql();
var entity = dataContext.TestTables.First();
}

Could you help me?
Thank you.

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

Post by StanislavK » Mon 18 Oct 2010 09:08

Thank you for your report, we have reproduced the problem. We will investigate it and inform you about the results.

As a temporary workaround, you can set the type of the problem field to String in the model.

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

Post by StanislavK » Thu 04 Nov 2010 17:48

We have fixed this problem, the fix is available in the latest 1.0.43 build of LinqConnect. The build can be downloaded from
http://www.devart.com/linqconnect/download.html
(the trial version) or from Registered Users' Area (provided that you have an active subscription):
http://secure.devart.com/

For the detailed information about the improvements and fixes available in LinqConnect 1.0.43, please refer to
http://www.devart.com/forums/viewtopic.php?t=19428

Post Reply