title: OleDB connection string for SQL Server in a C# program
body: <p>I have seen lots of answers to connect to MS Access via OleDB but there is not good answer for SQL Server. I try to connect to a SQL Server database via OleDB provider in my C# program. </p>
  
  <p>This is the connection string I am providing. </p>
  
  <pre><code>Provider=SQLOLEDB;Data Source=&lt;servername&gt;;Initial Catalog=&lt;dbname&gt;;Integrated Security=SSPI
  </code></pre>
  
  <p>But it gives me error </p>
  
  <blockquote>
    <p>‘Keyword not support ‘Provider’’</p>
  </blockquote>
  
  <p>What I want to do here is connect database via OleDB in C# program. </p>