title: Mono.Data.Sqlite.SqliteConnection.SetConfig throws a Library used incorrectly exception
body: <p>Using Xamarin.Android, I've tried to play with a sqlite database using the Mono.Data.Sqlite package (using a Nexus 7). </p>
  
  <p>Everything was fine until I tried to use multiple threads, then I got either a corrupted database or various exceptions locking the database (meaning I had to stop and restart the application to be able to access the db again).</p>
  
  <p>As recommended <a href="https://stackoverflow.com/questions/9307797/database-disk-image-is-malformed-in-monotouch/9312257?noredirect=1#comment21831178_9312257">here</a> I've tried to execute the following code as early as possible in my app :</p>
  
  <pre><code>Mono.Data.Sqlite.SqliteConnection.SetConfig (Mono.Data.Sqlite.SQLiteConfig.Serialized);
  </code></pre>
  
  <p>But I get an Mono.Data.Sqlite.SqliteException on that line stating : </p>
  
  <pre><code>Library used incorrectly
  </code></pre>
  
  <p>I've tried the 3 possible vales for the enum (SingleThreaded, Serialized, MultiThreaded) with the same outcome.</p>
  
  <p>Is this method working at all ? </p>
  
  <hr>
  
  <p>Edit : I fixed my source problem (those nasty infinite loop, I'll never get rid of that ...), so no need to play with the threading config for me anymore. </p>
  
  <p>I'll leave the question open for others though, as the problem is still here, and was experimented by others (<a href="https://stackoverflow.com/a/9312257/7059">cf the comments on this answer</a>)</p>