Issue with column of type INT64

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for SQLite
Post Reply
gcode
Posts: 2
Joined: Mon 06 Jun 2011 14:47

Issue with column of type INT64

Post by gcode » 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.

StanislavK
Devart Team
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Post by StanislavK » Tue 07 Jun 2011 15:40

Thank you for the report, we have reproduced the problem when the column type is defined as 'INT64'. We will analyze it and inform you about the results.

As a workaround, you can rename the server data type, e.g., to 'NUMERIC NOT NULL' or 'BIGINT NOT NULL' in the model.

gcode
Posts: 2
Joined: Mon 06 Jun 2011 14:47

Post by gcode » Fri 17 Jun 2011 15:44

Thanks for your quick reply. I am using your workaround already some days, but I did not "had the time" to post it.
Using the workaround everything is fine - queries and updates to the database are doing well.

Furthermore I would like to ask you, if you plan to release a version which works on Windows Phone 7 or even with MonoTouch on iOS 4.3 or later ?
What makes SQLite so interesting is that it's cross plattform. Having one database access library for all plattforms (which support .Net "in some way" ;-)) providing LINQ and easy database schema modelling - as your product does - would be very great and there would be no more doubt about using SQLite in our project.

I know there are some open-source projects out there which provide basic ADO.Net access to SQLite, but then we would have to operate on a very basic level (Comman level).

Thanks for your efforts.

StanislavK
Devart Team
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Post by StanislavK » Wed 22 Jun 2011 12:45

At the moment, we don't plan to implement a mobile edition of LinqConnect. The reason is that some of LinqConnect classes inherit from the ones from the System.Data.Linq assembly, and this assembly is not available in .NET Compact Framework.

As for the mobile edition of dotConnect for SQLite (with general ADO.NET functionality), we plan to implement it in future, but cannot provide any timeframe. We will post here when any new information about it is available.

Post Reply