two showstoppers, 2 different database backends

Discussion of open issues, suggestions and bugs regarding LinqConnect – Devart's LINQ to SQL compatible ORM
Post Reply
EricPeterson
Posts: 2
Joined: Sun 12 Jun 2011 07:14

two showstoppers, 2 different database backends

Post by EricPeterson » Tue 14 Jun 2011 02:53

I cannot understand what is going on. i am a new customer on a trial of linqconnect and want to purchase it very much, but i cannot seem to get it to work properly or there is a bug.

I create a diagram in visual studio 2010 and when i look at the ED DB explorer, i see all the tables, yet when i use the context object generated by LC, there are tables missing!

Dim rootPath As String = IO.Path.GetDirectoryName(Assembly.GetEntryAssembly.Location)
Dim dbFullpath As String = IO.Path.Combine(rootPath, My.Resources.dbFilename)

Dim connString As String = "data source=" & dbFullpath & ";FailIfMissing=false"

Using context As New DataContext.DataContext(connString)
context.CreateDatabase(True, True)
' do stuff
end using

if i use context.CreateDatabase(True, True) i get a database, but when i do

context.CreateDatabase(False, True)

an exception is thrown:

ex.InnerException
{"SQLite error
near ".": syntax error"}
Devart.Data.SQLite.SQLiteException: {"SQLite error
near ".": syntax error"}

"Devart.Data.SQLite.SQLiteException (0x80004005): SQLite error near ".": syntax error at Devart.Data.SQLite.a1.a(Byte[] A_0, UInt32 A_1, Byte[]& A_2) at Devart.Data.SQLite.bq.a(Byte[] A_0) at Devart.Data.SQLite.bl.b() at Devart.Data.SQLite.SQLiteDataReader.c() at Devart.Data.SQLite.SQLiteCommand.InternalExecute(CommandBehavior behavior, IDisposable statement, Int32 startRecord, Int32 maxRecords) at Devart.Common.DbCommandBase.InternalExecute(CommandBehavior behavior, IDisposable stmt, Int32 startRecord, Int32 maxRecords, Boolean nonQuery) at Devart.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior, Boolean nonQuery) at Devart.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior) at System.Data.Common.DbCommand.ExecuteReader() at Devart.Common.DbCommandBase.ExecuteNonQuery() at Devart.Data.Linq.Provider.DataProvider.CommandExecuter.Execute(List`1 sqls)"

so my question is this. why is it that I can see all the tables in the database explorer but when i simply pass in a different connection string? i assume the error is in relation to the creation of the missing tables.

if i copy paste the sql created from ED and manually execute it in a sqlite front end, all tables are created correctly.

I am shopping for an ORM solution and this is maddening, especially for something so simple as this when using sqlite.


As a secondary test, i changed the data provider to sql server 2008R2 and while the database gets created properly (all tables exist) the identity columns are not set properly even tho the sql script had IDENTITY for those columns when viewed in ED! I used DBMonitor and verified the IDENTITY statement is MISSING.

this makes me nervous.

Any help is appreciated!

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

Post by StanislavK » Tue 14 Jun 2011 14:43

Thank you for the report, we have reproduced the problem with the SQL generated on the CreateDatabase() call. We will inform you as soon as it is fixed. As a temporary workaround, you can create the database using the script generated by Entity Developer.

As for the problem with identity columns in SQL Server databases, we have already fixed it. The fix for this issue will be available in the nearest build, which we plan to release in several days.

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

Post by StanislavK » Fri 17 Jun 2011 16:27

We have released the new 2.50.25 build of LinqConnect, which includes the fix for the problem with identity fields in the script generated by the CreateDatabase method. The new build can be downloaded from
http://www.devart.com/linqconnect/download.html
(the trial and free versions) or from Registered Users' Area (for users with active subscription only):
http://secure.devart.com/

For the information about other fixes and improvements available in LinqConnect 2.50.25, please refer to
http://www.devart.com/forums/viewtopic.php?t=21284

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

Post by StanislavK » Fri 07 Oct 2011 09:45

We have fixed the problem with creating association in SQLite via the CreateDatabase method. The fix is available in the latest 3.0.5 build of LinqConnect. The new build can be downloaded from
http://www.devart.com/linqconnect/download.html
(the trial only) or from Registered Users' Area (for users with active subscription only).

For more information about the fixes and improvements available in LinqConnect 3.0.5, please refer to
http://www.devart.com/forums/viewtopic.php?t=22168

Post Reply