On Thu, Jul 5, 2012 at 7:46 AM, T Ü <[email protected]> wrote:
> I have an asp.net application.
> I open a sqlite in-memory connection with SQLiteConnection conn = new
> SQLiteConnection ( "Data Source=:memory:" ); command.
> I read that by using cache=shared parameter, I can make that in-memory
> database reachable from other connections.
>
> 1.What is the way of applying cache=shared parameter in this type of
> connection? SQLiteConnection conn = new SQLiteConnection ( "Data
> Source=:memory:?cache=shared" ); is not working?
I think you should write SQLiteConnection("Data
Source=file::memory:?cache=shared"). But this possibility was
introduced in SQLite 3.7.13. So your asp.net provider should be
compiled with the latest version of SQLite, otherwise it won't work.
> 2.What is the way of creating a new connection for accessing the previously
> opened in-memory database?
You should create new connection the same way as previously opened
one, i.e. SQLiteConnection("Data Source=file::memory:?cache=shared").
Pavel
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users