I am not familiar with the Windows System.Data.SQLite environment. The maintainer (Joe Mistachkin) is pretty good about catching up to the users list when he has time. Have you tried what's mentioned at the bottom of this page? http://www.jacopretorius.net/2011/01/using-linq-to-sql-with-sqlite.html
"Now when using your datacontext you can’t simply use a connection string, you need to add a reference to the System.Data.SQLite dll and then create an instance of the SQLiteConnectionString class. If you don’t do this the code seems to assume you’re trying to connect to a Sql Server database. private readonly DataSource dataSource = new DataSource(new SQLiteConnection(@"Data Source=database.db;DbLinqProvider=sqlite;")); And that’s it! Now you should be able to write Linq queries against your Sqlite database just like you would with a Sql Server database." -- -- -- --Ô¿Ô-- K e V i N On Mon, Sep 9, 2013 at 7:11 AM, Steve Palmer <swp...@gmail.com> wrote: > Thanks, but that just confirms what I mentioned which is that > SCOPE_IDENTITY is not valid in SQLite. The issue here is that the > generation of SQL statements from Linq statements is not being done by > System.Data.SQLite.Linq > which should be generating the correct syntax. > > There are other examples of SQL statements being passed to sqlite via Linq > which aren't valid. The long story made short is that there doesn't seem to > be any support for translating Linq statements to valid Sqlite statements > in System.Data.SQLite. For that you seem to use a third party solution. > > -Steve > > > > On 9 September 2013 12:00, Kevin Benson <kevin.m.ben...@gmail.com> wrote: > > > On Sun, Sep 8, 2013 at 2:36 AM, Steve Palmer <swp...@gmail.com> wrote: > > > > > Hi! > > > > > > Has anybody successfully used System.Data.SQLite.Linq in their project > > and > > > can perhaps help me with this? > > > > > > Even after including this DLL in my project reference, it is apparent > > that > > > Linq is calling the wrong provider when building the appropriate SQL > > > statements. It is throwing an exception in SQLiteCommand with the > > following > > > statement: > > > > > > INSERT INTO [Inbox] > > > ([Sender], [Subject], [Body], [Date], [ConversationID], > > > [RemoteID], [ReplyTo]) > > > VALUES > > > (@p0, @p1, @p2, @p3, @p4, @p5, @p6) > > > > > > SELECT CONVERT(Int,SCOPE_IDENTITY()) AS [value] > > > > > > The SCOPE_IDENTITY is not valid in SQLite. > > > > > > > > > http://stackoverflow.com/questions/304543/does-sqlite-support-scope-identity > > -- > > -- > > -- > > --Ô¿Ô-- > > K e V i N > > _______________________________________________ > > sqlite-users mailing list > > sqlite-users@sqlite.org > > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > > > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users