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