title: Ado connection to SQL Server Compact Edition 4.0
body: <p>I want to connect to SQL Server Compact Edition 4.0 from an old asp-classic site but i always get the error:</p>
  
  <p><code>"Microsoft OLE DB Provider for ODBC Drivers error '80004005'
  [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified. "</code></p>
  
  <p>I tried</p>
  
  <pre><code>sCon = "Data Source=c:\temp\sqlcompact.sdf;Encrypt Database=True;Password=testtest;Persist Security Info=False;"
  </code></pre>
  
  <p>and</p>
  
  <p>Update:
  Error: Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done</p>
  
  <pre><code>sCon = "Provider=Microsoft.SQLSERVER.CE.OLEDB.4.0;Data Source=c:\temp\sqlcompact.sdf;Password=testtest;"
  </code></pre>
  
  <p>without any success.</p>
  
  <p>Is it generally possible to connect to SQL Server CE 4.0 from ADO? </p>
  
  <p>Update: 
  Example Code
  Open Connection:</p>
  
  <pre><code>dim sCon
  
  dim gCON : set gCON=CreateObject ("ADODB.Connection")
  
  sCon = "Provider=Microsoft.SQLSERVER.CE.OLEDB.4.0;Data Source=c:\temp\sqlcompact.sdf;Pwd=testtest;"
  
  gCon.ConnectionString = sCon
  gCon.Open 
  gCon.Close
  </code></pre>