Tuesday, December 29, 2009

How to create SQL CE database Part -V

In this part-V blog series we are going to see how to create Simple SQL Compact Edition DB .

1) Start Visual studio  and then  create or open existing  Smart device project.

Click Data in the VS.NET IDE  menu and select "Add New Data Source..." to see the following dialog window

image

Select Database and click Next .

Now we need to select MS SQL CE 3.5 data source and click OK.

image

Click Create and provide the File name for the SQL CE DB.  you can provide Encryption password but in my case i am going to leave blank.

NOTE: SQL CE edition DB have  .SDF extension .

image

Now open the Database and create new table and create the Columns for the newly created table

image

 

image

Now build the project and deploy to the Emulator .

image

Open the DB from emulator and you can view the DB as shown.

In Query Analyzer, expand the tree under the Objects tab.  Query Analyzer allows you to explore and manage SQL Mobile databases from within the PDA environment.

image

image

 

Nandri(Thanks)

SreenivasaRagavan.

No comments: