in

System.Data.SQLite

An open source ADO.NET provider for the SQLite database engine

Connection string properties

Last post 05-25-2010 7:58 AM by cheetah. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 05-12-2010 7:27 AM

    Connection string properties

    Hello,

    Let's say I set page size and synchornous pragmas during creating a database from visual studio. Do I need to include them in my connection string every time I open it or is it per database setting?

    Thanks.

  • 05-12-2010 3:01 PM In reply to

    Re: Connection string properties

    I believe that PageSize is immutable once the database is created. Not sure about the synch prags.
  • 05-25-2010 7:58 AM In reply to

    Re: Connection string properties

    You can change page size after creating a database, but it requires doing a vacuum.  I.e. run "PRAGMA page_size = NNN" and then "VACUUM".  Queries of the page size in between setting it and vacuuming will return the old page size, but it will change after you vacuum.  The two commands must be done within the same connection, and I believe *outside* of a transaction.

    The synchronous setting should be mutable, but I've found that you cannot change it while a transaction is open (though that does not appear to be documented anywhere).

Page 1 of 1 (3 items)
Powered by Community Server (Commercial Edition), by Telligent Systems