title: Extract properties of sql connection string
body: <p>I want to extract from a connectionString (a string variable) the server and database names. The name of the server and database change as we move from DEV to STAGE and then PROD.<br></p>
  
  <p>Here's an example:<br></p>
  
  <pre><code>Data Source=SERVER_XYZ;Initial Catalog=DATABASE_XYZ;User ID=us;Password=pass
  
  Data Source=SERVER_XYZPQR;Initial Catalog=DATABASE_XYZPQR;User ID=us;Password=pass
  </code></pre>
  
  <p>Notice the name changes (as well as lengths of the whole string).<br></p>
  
  <p>How do I capture the data source and initial catalog without knowing the length it's going to be? So that on form load, it'll get the Server &amp; Database name to display to the user (so he/she can see which server and database he/she is connected to?</p>