I have an entity 4.0 model that is using a SqlServerCE database as its provider. On the server I want to use the same project and just switch out the connection string to use the actual SqlServer database.
Here is my connection string
<add name="Entities"
connectionString="metadata=res://*/Entities.csdl|res://*/Entities.ssdl|res://*/Entities.msl;
provider=System.Data.SqlClient;
provider connection string="
Data Source=xxxx;
Initial Catalog=xxxx;User ID=xxxx;Password=xxxx;""
providerName="System.Data.EntityClient" />
When I attempt to query the Entity Model, I get the following error:
SqlCeCommand.CommandTimeout does not support non-zero values.
If I set the context timeout to 0, it then says
Unable to cast object of type 'System.Data.SqlClient.SqlConnection'
to type 'System.Data.SqlServerCe.SqlCeConnection'.
How do I set the provider from SqlServerCE to SqlClient?