12/28/2010

Running SQL Server Compact on WINCE--Tutorial

Recently i had to use SQL server in WINCE which was installed on Friendly ARM device. I had to go through some R&D to find it. Got some errors in the beginning but finally was able to do so. Just to be simple on the new image of WINCE just copy these cab files from the pc and copy them to TEMP folder in the WINCE.

You can find these cab files in the Program Files/SQL Server Compact in ARM folder. You will also need a .NET cab file which you can get from Framework installed directory. If you have Visual Studio 2008 installed you can get them easily you don't need to download these.

The files are
1. NETCFv35.wce.armv4
2. sql.wce5.armv4i
3. sqlce.dev.ENU.wce5.armv4i
4. sqlce.repl.wce5.armv4i
5. sqlce.wce5.armv4i

After copying these files in TEMP folder in WINCE double click each of them to install them one by one. Install them on the default path (Recommended).

Now you can run SQLCE commands in your application using C# or any language . If any one of these files are not installed properly you may not be able to run the SQL Server Compact.

The database file is .sdf which will be used in WINCE. You can create this DB file in SQL Server Management 2008. On startup just select database engine type to compact and create the file. Then copy it to the WINCE and you are good to go.

How to connect to it will be in next tutorial....

Queries are welcomed..


Twitter Delicious Facebook Digg Favorites More