LinqConnect Professional Version 4.5.940 (25-Feb-2016) - Unable to cast

Discussion of open issues, suggestions and bugs regarding LinqConnect – Devart's LINQ to SQL compatible ORM
Post Reply
AKRRKA
Posts: 198
Joined: Thu 26 Jan 2012 15:07
Location: Russia
Contact:

LinqConnect Professional Version 4.5.940 (25-Feb-2016) - Unable to cast

Post by AKRRKA » Tue 12 Apr 2016 16:32

LinqConnect Professional Version 4.5.940 (25-Feb-2016) - Error

Hello.

Often, the error appears. A very long time I am trying to identify it.
And now, finally, I found what was going on.

For some reason, when using the connection between the three tables, there is a problem - "Unable to cast SQLiteProviderType to MySqlProviderType.".

For clarity, I gave a simple example.
In the archive, the source code and a video demonstration.

Perhaps something with a cache of ORM.

Example-2016.04.12.rar (7.0 МБ) - (WinRar 5.x archive type)
MD5:6d7aeed56c705fafb0d053c0daa7377a
SHA:197f7d5414391e0504320444c9c61d9e9eb915c1c
http://rghost.ru/6DN72xlS2
http://nashdisk.ru/cbc2ac/
System.InvalidCastException перехвачено
_HResult=-2147467262
_message=Не удалось привести тип объекта "Devart.Data.SQLite.Linq.Provider.SQLiteProviderType" к типу "Devart.Data.MySql.Linq.Provider.MySqlProviderType".
HResult=-2147467262
IsTransient=false
Message=Не удалось привести тип объекта "Devart.Data.SQLite.Linq.Provider.SQLiteProviderType" к типу "Devart.Data.MySql.Linq.Provider.MySqlProviderType".
Source=Devart.Data.MySql.Linq
StackTrace:
в Devart.Data.MySql.Linq.Provider.MySqlDataProvider.ProcessParameterValue(DbParameter parameter, Type clrType, ProviderType providerType, Object value)
в Devart.Data.Linq.DataProvider.ApplyParameter(DbParameter parameter, String name, ParameterDirection direction, ProviderType providerType, Type clrType, Object parameterValue)
в Devart.Data.Linq.DataProvider.a(c1 A_0, Object[] A_1)
в Devart.Data.Linq.DataProvider.b(c1 A_0, Object[] A_1)
в Devart.Data.Linq.Engine.a3.a(IProvider A_0, Object[] A_1)
в Devart.Data.Linq.Engine.bc.a(IProvider A_0, Object[] A_1)
в Devart.Data.Linq.Engine.DeferredEnumerable`1.GetEnumerator()
в System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source)
в Devart.Data.Linq.EntityRef`1.get_Entity()
в ceContext.Company.get_ComType() в d:\Repository\temp\WindowsFormsApplication8-2016.04.12\ORM Datasource\ceDataContext.Designer.cs:строка 297
в ORM_Datasource.FormMain.GetControlObjects(ceDataContext dcContext) в d:\Repository\temp\WindowsFormsApplication8-2016.04.12\ORM Datasource\FormMain.cs:строка 81
InnerException:
PS: Here's another related topic - http://forums.devart.com/viewtopic.php?f=31&t=24588

AKRRKA
Posts: 198
Joined: Thu 26 Jan 2012 15:07
Location: Russia
Contact:

Re: LinqConnect Professional Version 4.5.940 (25-Feb-2016) - Unable to cast

Post by AKRRKA » Wed 13 Apr 2016 11:35

I forgot the copy MySQL base.
But it can be created from the model and fill the test data from the program by clicking on the button "Add Data".

Just in case I share a copy of the database:
http://rghost.ru/7SMGQXwrk
http://nashdisk.ru/8677c9/

This problem is very torment. The big request fix it as quickly as possible.
Thanks.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: LinqConnect Professional Version 4.5.940 (25-Feb-2016) - Unable to cast

Post by Shalex » Thu 14 Apr 2016 18:25

Thank you for the test project. We have reproduced the error and are investigating the issue. We will notify you about the result as soon as possible.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: LinqConnect Professional Version 4.5.940 (25-Feb-2016) - Unable to cast

Post by Shalex » Thu 21 Apr 2016 13:38

We have provided a solution to you by email.

AKRRKA
Posts: 198
Joined: Thu 26 Jan 2012 15:07
Location: Russia
Contact:

Re: LinqConnect Professional Version 4.5.940 (25-Feb-2016) - Unable to cast

Post by AKRRKA » Fri 22 Apr 2016 10:05

I tried. The problem is not repeated.
Solution seems ambiguous.
Do not know yet how to real, commercial project impact.

Post Reply