title: how to insert variables into vb.net connection string
body: <p>I'm trying to insert variables into my connection string hoping that they will be saved for executing multiple queries.</p>
  
  <p>What I'm trying is something like this:</p>
  
  <pre><code>Private sConnectionString As String = "Provider=TDOLEDB;Data Source=TDDEV;Persist Security Info=True;User ID="&amp;user&amp;";Password="&amp;pass&amp;";Default Database=bcpm_ddbo;Session Mode=ANSI;"
  </code></pre>
  
  <p>but it's not working. </p>
  
  <p>OR</p>
  
  <p>I wouldn't mind doing something like below, but only one prompt and leave the connection open?</p>
  
  <pre><code>Private sConnectionString As String = "Provider=TDOLEDB;Data Source=TDDEV;Persist Security Info=True;Prompt=Complete;Default Database=bcpm_ddbo;Session Mode=ANSI;
  </code></pre>
  
  <p>"</p>
  
  <p>any help would be greatly appreciated!!!</p>