Page 1 of 1

invalid datatype error

Posted: Tue 23 Dec 2008 21:01
by commodoreKid
I am evaluating dotConnector for SQLite for my company. I am particularly interested in using it with LINQ.

I have a simple database that I have created. I used EntityDeveloper to create a DataContext class for the database.

I have written some code to return information from a table in the database but I am getting an error when I try to execute the foreach loop. The error is reporting that the object q is an "Invalid datatype: Integer". Here is the code:

Code: Select all

testDataContext db = new 

var q =
     from x in db.AssetClass
     select x;
 
foreach (var ac in q)
      Console.WriteLine("ID = {0}, Name = {1}", ac.ID, ac.Name);
Can anyone please help me figure this out? If it would help to have my DataContext class or the database to help figure this out, please let me know. Thanks for the help.

Posted: Thu 25 Dec 2008 11:04
by AndreyR
Thank you for the report, we have reproduced the problem and now we are investigating it. As a workaround, try using the INT synonym instead of INTEGER in your DB creation script..

Posted: Mon 29 Dec 2008 14:23
by commodoreKid
That worked. Thank you very much!