two showstoppers, 2 different database backends
Posted: 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!
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!