Page 1 of 1

Entity framework support

Posted: Sat 19 Apr 2008 20:17
by Sephiroth
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

Posted: Mon 21 Apr 2008 10:25
by Alexey.mdr
Hi!

Could you please post the table definition script?

Thanks,
Alexey.

Posted: Mon 21 Apr 2008 10:55
by Sephiroth
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)
);

Posted: Mon 21 Apr 2008 11:13
by Alexey.mdr
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.

Posted: Mon 21 Apr 2008 16:51
by Sephiroth
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   
---------------------------

Posted: Tue 22 Apr 2008 09:54
by Alexey.mdr
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).

Posted: Tue 22 Apr 2008 15:57
by Sephiroth
Great, thanks.

Posted: Thu 24 Apr 2008 14:26
by Alexey.mdr
The bug has been solved in the new build.
The build is available for download now.

Posted: Thu 24 Apr 2008 16:31
by Sephiroth
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.

Posted: Sat 26 Apr 2008 08:55
by Alexey.mdr
Hi!

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

Alexey
Core Lab Team