2

In my current project I found myself in need for a connection to a database.

However in the new asp.net 5.0 I found myself in the position where I could only find SqlCeCommand.

So now is my question is there or what is the difference between SqlCeCommand and SqlCommand?

SqlCeCommand is a class from System.Data.SqlServerCe; and SqlCommand is a class from System.Data.SqlClient

1
  • 1
    SqlCommand = server-based SQL Server (Express, Web, Standard, Enterprise); SqlCeCommand = SQL Server Compact Edition - based on a .sdf file, single-user, used for local storage only, embedded by including some DLL's in your app Commented Mar 4, 2015 at 9:23

1 Answer 1

2

SqlCeCommand is a specialized command that can be used to talk to the compact edition of the SQL Server (SQL Server Compact). SqlCommand is a specialized command that can be used to talk to the regular Microsoft SQL Server. Both inherit from DbCommand, a generic version independent from the target database type and version.

We usually work with IDbCommand to be independent from provider-specific features, which makes it easier to migrate to another database engine. The connection as well as command are retrieved from a factory.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.