Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQLite and Entity Framework

I'm trying to use SQLITE database with latest Entity Framework. I've installed SQLite provider x86 for .NET Framework 4.0 from here: http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki.

I succesfully added SQLITE as new data source by using server explorer in Visual Studio 2012. Then, I added new ADO.NET Entity Model and tried to add tables from my simple sqlite database. For some reason these tables can't be added and error log says following:

The data type 'longchar' is currently not supported for the target .NET Framework version; >>the column 'Name' in table 'main.Person' was excluded.

I dont understand why it's trying to convert SQLite TEXT type to longchar and fails. Can anyone help me with this problem?

like image 676
WonderMike Avatar asked Feb 24 '26 03:02

WonderMike


1 Answers

I was just getting this issue today after setting up my development environment for a project that uses SQLLITE and ADO at work and the fix was simple. Version 1.0.85.0 is broken and version 1.0.84.0 works.

32 BIT: http://system.data.sqlite.org/downloads/1.0.84.0/sqlite-netFx40-setup-bundle-x86-2010-1.0.84.0.exe

64 BIT: http://system.data.sqlite.org/downloads/1.0.84.0/sqlite-netFx40-setup-bundle-x86-2010-1.0.84.0.exe

Uninstall make sure to delete the program files for each install and also when you re-install tell the installer to rebuild your GAC. Should work that was the only difference between my and my boses build machine, that website needs to list previous revisions better.

like image 192
Encladius Avatar answered Feb 25 '26 18:02

Encladius



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!