title: Unexpected error when trying to connect to database in Visual Studio 2010
body: <p><strong>The problem:</strong></p>
  
  <p>In Visual Studio 2010 Professional I choose Server Explorer and right-click on Data Connections to choose "Add Connection". Then I get this error:</p>
  
  <blockquote>
    <p>An unexpected error occurred in the
    .NET Framework Data Provider for
    Microsoft SQL Server Compact 3.5.
    Please contact the provider vendor to
    resolve this problem.</p>
  </blockquote>
  
  <p><strong>My enviroment:</strong></p>
  
  <ul>
  <li>Windows 7 SP1</li>
  <li>Visual Studio 2010 Professional (trial version)</li>
  <li>SQL Server 2008 R2 Express</li>
  </ul>
  
  <p><strong>I've tried</strong></p>
  
  <ul>
  <li>Installing Visual Web Developer Express (gives the same problem)</li>
  <li>Reinstall of VS 2010 Professional</li>
  <li>Reinstall of Sql Server 2008 R2 Express</li>
  <li>Tools => Import and Export Setting => Reset all Settings</li>
  <li>Run: Devenv.exe /ResetSkipPkgs</li>
  </ul>
  
  <p><strong>Comments</strong></p>
  
  <p>Maybe the registry is messed up in some way. 
  One post:
  <a href="http://social.msdn.microsoft.com/Forums/en/vstsstart/thread/b6f7fc36-5a34-4166-9e75-7ac39993182b" rel="nofollow">http://social.msdn.microsoft.com/Forums/en/vstsstart/thread/b6f7fc36-5a34-4166-9e75-7ac39993182b</a></p>
  
  <p>says that I should modify the registry at
  HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\DataProviders</p>
  
  <p>But I don't even have a folder named DataProviders in the 9.0 (or 10.0) folder. So maybe that's a problem.</p>
  
  <p>Thanks for any help!</p>