I use NHibernate for my dataacess, and for awhile not I\'ve been using SQLite for local integration tests. I\'ve been using a file, but I thought I would out the :memory: o
Just a wild guess, but is the sql output by NHibernate using a command unsupported by sqlite?
Also, What happens if you use a file instead of memory? (System.IO.Path.GetTempFileName() would work i think...)
We are using SQLite in memory for all our database tests. We are using a single ADO connection for the tests that is reused for all NH sessions opened by the same test.
This allows also running tests with several sessions included. The SessionFactory is also created once for all tests, because the reading of the mapping files takes quite some time.
Edit
Since System.Data.Sqlite 1.0.82 (or Sqlite 3.7.13), there is a Shared Cache, which allows several connections to share the same data, also for In-Memory databases. This allows creation of the in-memory-database in one connection, and use it in another. (I didn't try it yet, but in theory, this should work):
file::memory:?cache=shared
I got the same error, when I forgot to import the SQLite Nuget package.