title: C++ ADO Connection Pooling
body: <p>Previously, I had my own custom ConnectionPool class,,, but I found out that I can instead use the connection pooling feature simply by including it in my Connection string..
  (<a href="http://www.codeproject.com/Articles/17768/ADO-NET-Connection-Pooling-at-a-Glance" rel="nofollow">http://www.codeproject.com/Articles/17768/ADO-NET-Connection-Pooling-at-a-Glance</a>)</p>
  
  <p>So here is my simple test code so far:</p>
  
  <pre><code>int main(int argc, char** argv) {
  
      ::CoInitiazlie();
  
      char* ConnString = "Provider=ASEOLEDB; Data Source=xxx;  Min Pool Size=5;";
  
      _ConnectionPtr MyPointer = NULL;
      MyPointer.CreateInstance(__uuidof(Connection));
      MyPointer -&gt; Open(ConnString, "myusername", "mypassword", adConnectUnspecified);
  
      //BREAK POINT....
  
      MyPointer -&gt; Close();    
  
      ::CoUninitialize();
  
  }
  </code></pre>
  
  <p>So according to the description from the link,, this should have opened and kept 5 connections inside the pool at BREAK POINT.. (due to the "Min Pool Size=5" Option inside the Connection String).</p>
  
  <p>However, when I open up the session manager, only I see only 1 connection opened..</p>
  
  <p>I am not sure what I did wrong.. How exactly does setting Min Pool Size in the Connection string create a connection pool??</p>
  
  <p>Thanks</p>