2
votes

I want to use SQL server compact 3.5, but intellisense is not showing System.Data.SqlServerCe namespace.. it says type or namespace 'SqlServerCe' does not exist in 'System.Data' namespace (are you missing any Assembly reference?)

Which Assembly needs to be referenced?

or do I need to use any other namespace to use SQL Server Compact 3.5?

I have Sql Server 2005 Standard and Express installed, and VC# 2010.

Please provide some reference link to work with SQL Server CE 3.5..

3

3 Answers

5
votes

In Add Reference, if you do not see the reference as in the screenshot, browse to the C:\Program Files (x86)\Microsoft SQL Server Compact Edition\v3.5\Desktop folder

3
votes

The SQL Server Compact Edition (CE) libraries live in the System.Data.SqlServerCe namespace, which is in the System.Data.SqlServerCe assembly. This assembly is not referenced by default - you need to explicitly add a reference to it before you can use it!

enter image description here

Once you have that in place, you will also need a

using System.Data.SqlServerCe;

at the top of your C# file using SQL Server CE.

Check out Erik EJ's blog for a great reference for all things SQL Server CE

1
votes

You need to add a reference to the 'System.Data.SqlServerCe' assembly. You can download and install CE from here.