Use of SqlConnectionCE in Smart Device Application

Are you familiar with the Windows CE OS?

This operating system is found in Handheld Terminal (HHT) Devices. In simple terms, Barcode scanning devices.


You have seen those devices in retail stores Like Easyday, Bigbazaar, and Private Courier. People also use these devices for electronic signatures and so on. When you use a database in the device then you need to use SqlConnectionCE.

Until now you are only familiar with.

  • SqlConnection
  • SqlCommand
  • SqlDataReader
  • SqlDataAdapter

In Windows CE device applications those will not work since those classes use SQL Server. When you manage your database in the device itself then you use.

  • SqlCEConnection
  • SqlCECommand
  • SqlCEDataReader
  • SqlCEDataAdapter

To use SqlCEConnection you must add the reference first. You can get a related reference System.Data.SqlserverCE in Add Reference under the .Net tab.

In this application, the database will be in the file with a .sdf extension. We can use the SDF database in the device for small use. Until Visual Studio 2008 there is an option available with the name of Smart Device Project.


I will explain how to create an SDF database in an HHT device in my next article. Stay tuned.

Thanks for reading.

Similar Articles