Sam Carleton wrote:
>
> Ok, that is good to know.  If I am not mistaken,  System.Data.SQLite takes
> part in the .Net connection pooling,  What is the best way to ensure that
> these two features are set correctly?  Does the program simply need to
make
> sure it issues the pragma after each connection, assuming it is always
new? 
> 

System.Data.SQLite actually handles its own connection pooling.  In order to
use it, you'll want to add "Pooling=True;" to your connection strings.  Yes,
the program will need to make sure it issues the PRAGMA statements for each
connection.

> 
> I do use SQLite in C/C++ application where I have recompiled SQLite DLL to
> force these settings.  In looking through the .net code, it looks like it
> simply a wrapper around the SQLite dll, Is it possible to have the .Net
> application simply use that version of the DLL rather than the one that
> came with System.Data.SQLite?
> 

Yes, there are several ways to do this.  One way is to simply compile the
System.Data.SQLite assembly in such a way that it uses a "standard" SQLite
DLL, via setting the following MSBuild properties:

        /p:UseSqliteStandard=true /p:UseInteropDll=false

It should be noted that System.Data.SQLite requires several SQLite options
be enabled at compile-time to operate correctly, including but not limited
to:

        SQLITE_ENABLE_COLUMN_METADATA=1;SQLITE_THREADSAFE=1;

Alternatively, you can use the default set of MSBuild properties and then
customize the source code for "SQLite.Interop.dll", e.g. in the "interp.c"
source code file.

--
Joe Mistachkin

_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to