Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to connect to SQL Server Ce database from C#?

How to Connect Sql Server CE Db to C# DotNet 4.0 I've Heard of System.Data.SqlServerCe NameSpace for Connecting local database but i am unable to find it in .Net 4.0

is there any alternate Class?

like image 331
Inv Xaasha Avatar asked Dec 01 '22 09:12

Inv Xaasha


1 Answers

You need to have included the System.Data.SqlServerCe namespace

Its in the System.Data.SqlServerCe.dll

If that namespace doesn't show up then probably you haven't included refrence to that dll.

Add a reference to that dll and it should be available.

If you are still having problem then check out its in GAC. (On my system its here:
C:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Data.SqlServerCe.Entity\v4.0_4.0.0.0__89845dcd8080cc91

Some answers have already mentioned how to use it.

like image 178
Shekhar_Pro Avatar answered Dec 19 '22 04:12

Shekhar_Pro