I have an entity model 4.0 that uses the SqlServerCE database as its provider. On the server, I want to use the same project and just disconnect the connection string in order 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 try 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 will say
Unable to cast object of type 'System.Data.SqlClient.SqlConnection'
to type 'System.Data.SqlServerCe.SqlCeConnection'.
How to install a provider from SqlServerCE to SqlClient?
source
share