SQL CE with ASP .NET Application

Use the below code snippet to make SQL CE it work with ASP .NET application [C#] protected void Page_Load(object sender, EventArgs e){ AppDomain.CurrentDomain.SetData("SQLServerCompactEditionUnderWebHosting", true); string connectionString = @"Data Source=|DataDirectory|\Northwind.sdf"; Northwind nw = new Northwind(connectionString); var DataSource = nw.Orders.Skip(0).Take(100).Select(o => o);} [WebConfig] <assemblies&gt <add assembly="System.Data.SqlServerCe, Version=3.5.1.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91"&gt </assemblies &gt

SQL CE db creation with C#

I hope this would be useful for porting a MDF Sql db to CE Sql db. we all very much familiar with ADO.NET the namespaces available for SQL server data provider are System.Data and System.Data.SqlClient similarly in ADOCE.NET for SQL CE data provider are System.Data and System.Data.SqlserverCE. The process to develop an application to use... Continue Reading →

Powered by WordPress.com.

Up ↑