0
<connectionStrings>
    <add name="CalculatorEntities" 
         connectionString="metadata=res://*/DomainModel.Model.csdl|res://*/DomainModel.Model.ssdl|res://*/DomainModel.Model.msl;provider=System.Data.SqlServerCe.4.0;provider connection string=&quot;data source=|DataDirectory|\Calculator.sdf&quot;" 
         providerName="System.Data.EntityClient"/>
</connectionStrings>

We are reading data in C# win app from a SQL Server CE 4.0 .sdf file. Problem is that first time when application is opening taking more then 30s but when application is opened then application working normally.

I think that problem is with the connection string and reading from assembly. Probably application searching so long for .sdf file before can find it.

How can I optimize connectionStrings? What can we do?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
mbrc
  • 3,523
  • 13
  • 40
  • 64
  • 1
    First things first. Instead of guessing what it could be that takes so long, *find out* what takes so long. Then fix that, instead of "fixing" random things. – nvoigt Feb 16 '14 at 16:12
  • The question is about SQL Server Compact, not SQL Server, very different products - for reasons see my blog post here: http://erikej.blogspot.dk/2013/08/faq-why-is-opening-my-sql-server.html – ErikEJ Feb 17 '14 at 16:39

0 Answers0