Entity framework support

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for SQLite
Post Reply
Sephiroth
Posts: 7
Joined: Sat 19 Apr 2008 20:07

Entity framework support

Post by Sephiroth » Sat 19 Apr 2008 20:17

Hello,

I am trying SQLite to generate an edmx file, but keep getting an message that Datatype Integer is not supported, i also tried to change the type to int32, but that does not work either.

This is the message:
Message: The data type 'int32' is not supported, the column 'ID' in table 'main.Eenheid' was excluded.
Error Code: 6031
Severity: Warning

Or:

Message: The data type 'integer' is not supported, the column 'ID' in table 'main.Eenheid' was excluded.
Error Code: 6031
Severity: Warning

Reproduction:
Create an new SQlite database, add an new table with an ID column and a text column and make the ID column the primary key.
Then startup the SQLiteEdmWizard and try to generate the edmx file. the Integer columns are not generated.

Regards

Alexey.mdr
Posts: 729
Joined: Thu 13 Dec 2007 10:24

Post by Alexey.mdr » Mon 21 Apr 2008 10:25

Hi!

Could you please post the table definition script?

Thanks,
Alexey.

Sephiroth
Posts: 7
Joined: Sat 19 Apr 2008 20:07

Post by Sephiroth » Mon 21 Apr 2008 10:55

I used SQLite Enterprise manager to convert an MsSQL database to SQLite, This is the create statement it uses:

Code: Select all

CREATE TABLE Eenheid
-- This table created by SQLite2008 Pro Enterprise Manager 
-- Osen Kusnadi - http://www.osenxpsuite.net 
-- Created date: 2008-04-19 21:20:01
( 
       ID INTEGER,
       Omschrijving TEXT,
       PRIMARY KEY (ID)
);

Alexey.mdr
Posts: 729
Joined: Thu 13 Dec 2007 10:24

Post by Alexey.mdr » Mon 21 Apr 2008 11:13

Try using this script

Code: Select all

CREATE TABLE Eenheid
(
       ID INT,
       Omschrijving TEXT,
       PRIMARY KEY (ID)
);
or

Code: Select all

CREATE TABLE Eenheid
(
       ID LONG,
       Omschrijving TEXT,
       PRIMARY KEY (ID)
);
The INTEGER type is split into several subtypes for proper memory management on the client side.

Sephiroth
Posts: 7
Joined: Sat 19 Apr 2008 20:07

Post by Sephiroth » Mon 21 Apr 2008 16:51

That works, but gives me an other problem, i need a Primary key with autoincrement enabled. When i try to add this the statement does not work anymore.

SQLite only allows Autoincrement on INTEGER fields.

Code: Select all

CREATE TABLE Eenheid2 
( 
       ID INT PRIMARY KEY AUTOINCREMENT, 
       Omschrijving TEXT
)

gives this exception:

Code: Select all

---------------------------
SQLiteSpy
---------------------------
SQLite Error 1 - AUTOINCREMENT is only allowed on an INTEGER PRIMARY KEY.
---------------------------
OK   
---------------------------

Alexey.mdr
Posts: 729
Joined: Thu 13 Dec 2007 10:24

Post by Alexey.mdr » Tue 22 Apr 2008 09:54

Hi!

Thank you for the inquiry.
This bug will be fix in the next build.
The LONG (Int64) type will be replaced with INTEGER one in dotConnect for SQLite (Entity Framework only).

Sephiroth
Posts: 7
Joined: Sat 19 Apr 2008 20:07

Post by Sephiroth » Tue 22 Apr 2008 15:57

Great, thanks.

Alexey.mdr
Posts: 729
Joined: Thu 13 Dec 2007 10:24

Post by Alexey.mdr » Thu 24 Apr 2008 14:26

The bug has been solved in the new build.
The build is available for download now.

Sephiroth
Posts: 7
Joined: Sat 19 Apr 2008 20:07

Post by Sephiroth » Thu 24 Apr 2008 16:31

Alexey.mdr wrote:The bug has been solved in the new build.
The build is available for download now.
Great, i gave my boss the go-ahead for ordering the SQLite provider. the rest of the provider works fine on all our unit-tests.

Alexey.mdr
Posts: 729
Joined: Thu 13 Dec 2007 10:24

Post by Alexey.mdr » Sat 26 Apr 2008 08:55

Hi!

Sounds good!
Let me know if you have any questions or concerns about the product.

Alexey
Core Lab Team

Post Reply