Search code examples
databaseconnectionsql-server-ce

Instance of SqlCeConnection takes too long


When I create a new instance of SqlCeConnection it takes too long to create.

connection = new SqlCeConnection ();

This line in my program takes about 30 seconds to complete. This started happening to me recently, so when I run the program in another system it does it instantly.

I have added a reference to the System.Data.SqlServerCe.dll of the Microsoft SQL Server Compact 4.0, and I have tried doing the local reference, and it does not help either. I would like to know why this happens?

Thanks


Solution

  • Could be certificate or registry key issue, see my blog post here: http://erikej.blogspot.dk/2013/08/faq-why-is-opening-my-sql-server.html?m=1