title: How to use SqLite connection pool in C# or VB.NET?
body: <p>The connection string for SqLite can include options for using a connection pool, e.g. (pseudo code)</p>
  
  <pre><code>Dim connectionString = "Data Source=" + Path + ";" +
                                      "Version=3;" +
                                      "Pooling=True;" +
                                      "Max Pool Size=100;"
  </code></pre>
  
  <p>I would expect that there is some extra class or factory method for using connection pools, e.g.</p>
  
  <pre><code>dim connectionPool = new SqLiteConnectionPool(connectionString)
  
  dim firstConnection = connectionPool.getConnection()
  ...
  firstConnection.dispose()
  
  ...
  dim secondConnection = connectionPool.getConnection()
  </code></pre>
  
  <p>However, I could not find such a class. </p>
  
  <p>=> <strong>How do I give back a connection to the connection pool</strong>?</p>
  
  <p>=> <strong>How can I reuse a connection that has previously been returned to the pool</strong>?</p>
  
  <p>Searching for "pool" on <a href="https://system.data.sqlite.org/index.html/doc/trunk/www/index.wiki" rel="nofollow noreferrer">https://system.data.sqlite.org/index.html/doc/trunk/www/index.wiki</a> did not give any results.</p>
  
  <p>a) Do I have to call the constructor for the connection several times?</p>
  
  <pre><code>dim firstConnection = new SqLiteConnection(connectionString)
  ...
  firstConnection.dispose()
  
  
  dim secondConnection = new SqLiteConnection(connectionString)
  </code></pre>
  
  <p><strong>Passing the connection string several times does not seem to be intuitive for me.</strong> </p>
  
  <p>b) Or would I create the connection only once and somehow wake it up after it has been closed/disposed?</p>
  
  <pre><code>dim connection = new SqLiteConnection(connectionString))
  using connection 
   ...
  end using 
  
  connection.open()
  using connection
   ...
  end using 
  </code></pre>