Issue with column of type INT64
Posted: Mon 06 Jun 2011 15:37
I currently evaluate dotconnect 4 SQLite for our company and trying out the LinqConnect Feature - using the newest build "3.30.165 01-Jun-11".
I got a simple table "Dummy" with the following DDL :
CREATE TABLE [Dummy] (
[ObjID] INT64 NOT NULL,
[Name] TEXT NOT NULL,
CONSTRAINT [sqlite_autoindex_Dummy_1] PRIMARY KEY ([ObjID]));
The I got a simple console application as in your tutorial (it's great by the way, in order to get things run
. If I just make a select on all rows in the table I get an excetion "Invalid datatype: INT64" in the moment when the query is evaluated (on the first turn of the foreach loop)
static void Main(string[] args)
{
DataContextTryoutSQLite lDataContextTryoutSQLite = new DataContextTryoutSQLite();
var allDummies = from dy in lDataContextTryoutSQLite.Dummies select dy;
foreach(DataLayer.Dummy curDummy in allDummies )
{
Console.WriteLine("{0} | {1}", curDummy.ObjID, curDummy.Name);
}
Console.ReadLine();
}
The generated Code for the class Dummy seems to be correct (there is a Property ObjID of long and even the type INT64 is recognized)
[Column(Storage = "_ObjID", CanBeNull = false, DbType = "INT64 NOT NULL", IsPrimaryKey = true)]
public long ObjID
I gave it a try with column-type "INT" and it works. But for our application we need C#-classes with properties of type "long".
Any suggestions what's wrong - thanks in advance.
I got a simple table "Dummy" with the following DDL :
CREATE TABLE [Dummy] (
[ObjID] INT64 NOT NULL,
[Name] TEXT NOT NULL,
CONSTRAINT [sqlite_autoindex_Dummy_1] PRIMARY KEY ([ObjID]));
The I got a simple console application as in your tutorial (it's great by the way, in order to get things run

static void Main(string[] args)
{
DataContextTryoutSQLite lDataContextTryoutSQLite = new DataContextTryoutSQLite();
var allDummies = from dy in lDataContextTryoutSQLite.Dummies select dy;
foreach(DataLayer.Dummy curDummy in allDummies )
{
Console.WriteLine("{0} | {1}", curDummy.ObjID, curDummy.Name);
}
Console.ReadLine();
}
The generated Code for the class Dummy seems to be correct (there is a Property ObjID of long and even the type INT64 is recognized)
[Column(Storage = "_ObjID", CanBeNull = false, DbType = "INT64 NOT NULL", IsPrimaryKey = true)]
public long ObjID
I gave it a try with column-type "INT" and it works. But for our application we need C#-classes with properties of type "long".
Any suggestions what's wrong - thanks in advance.