I've built an app that uses SQL Server CE 4.0 by default, but can also use a separate SQL Server (SQL Server Express).
I've deployed it to about 10 computers around the office and it works fine except on 2 of them: the VP and a QA guy, of course :-/
On these computers, the database accesses are taking around 30 seconds each! If I install SQL Server Express 2008 R2, and tell my app to use it instead, then it runs very fast.
- Both problem machines are WinXP SP3, but most of the working PCs are XP also.
- I'm using C#.NET 4.0 App uses private deployment of SQL Server CE via ClickOnce.
- I'm using
DbProviderFactory
to allow access to both SQL Server Express or SQL Server CE with the same query text (or data adapters). - Most of the queries are simple. A few use
DataAdapter
- Almost all of the queries eventually return data, but I saw one in my log file that returned empty, without an error/exception, but should have had about 20-40 rows and about 80 columns.
- For every query, I create, open and close the connection. I am unclear if this is required/recommended/not-recommended with SQL Server CE.
I can't understand why this app works on most PCs, but not on these few.
Any ideas are welcome.
Thanks!