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. How do I direct
System.Data.SQLite.DLL to use the SQLite Linq SQL builder when constructing
SQL statements?

My DbProviderFactories is:

  <DbProviderFactories>
    <remove invariant="System.Data.SQLite"/>
    <add name="SQLite Data Provider" invariant="System.Data.SQLite"
description=".Net Framework Data Provider for SQLite"
type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite,
Version=1.0.88.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139"/>
  </DbProviderFactories>

is this correct?

*Additional info.* I don't see System.Data.SQLite.Linq.dll in the list of
Modules in VS2012 when my application is loaded even though it is in the
bin folder. This confirms my suspicion that I'm missing something that
explicitly references it but I can't figure out what it is.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to