Pretty straightforward question. I'm building an app which reads data from a SQL Server 2005 instance. I wanted to run some tests on my laptop (which does not have SQL 2005) so I was looking at swapping in a local database for the purpose of the tests.
I'm using VS2008 so the Compact Edition DB seemed a natural choice. I had hoped to just swap out my connection string, but it seems It will only let me connect to the CE database using the SqlCeConnection and not SqlConnection. Any way around this, modifiers I can use in the connection string perhaps?
It's actually very possible to user SQL CE instead of full-blown SQL Server by only modifying configuration parameters: change connection string and use IDbXXX
family interfaces wherever possible instead of platform-specific SqlXXX
and SqlCeXXX
ones. See DbProviderFactories.
Be advised, however, of differences in SQL dialects of these two platforms.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With