-
In Solution Explorer, right-click References and select Add Reference.
Note If the References folder is not listed in Solution Explorer, click Show All Files at the top of Solution Explorer.
-
In the list of .NET Assemblies, select System.Data.SqlServerCe, and then click OK. If System.Data.SqlServerCe is not listed, follow these steps:
-
In the Add References dialog box, click Browse.
-
Navigate to the following folder: %Program Files%\Microsoft SQL Server Compact Edition\v4.0\Desktop.
-
Select System.Data.SqlServerCe.dll, then click OK.
Note
If your project uses the Entity Framework, repeat the same steps to add a reference to System.Data.SqlServerCe.Entity. You can add System.Data.SqlServerCe.Entity from list of .NET assemblies, or you can browse to %Program Files%\Microsoft SQL Server Compact Edition\v4.0.
-
In the Add References dialog box, click Browse.
-
In Solution Explorer, right-click Form1.cs or Form1.vb and select View Code.
-
At the top of the code for the form, add a directive to use the System.Data.SqlServerCe namespace. If you use the Entity Framework, add a directive to use the System.Data.SqlServerCe namespace. For a Tablet PC application, also add a directive to use the Tablet PC API:
-
C#
using System.Data.SqlServerCe; using System.Data.SqlServerCe.Entity; using Microsoft.Ink;
-
Visual Basic
Imports System.Data.SqlServerCe Imports System.Data.SqlServerCe.Entity Imports Microsoft.Ink
-
C#
Tuesday, 7 June 2016
How to add a reference to SQL Server Compact 4.0 for Central Deployment
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Note: only a member of this blog may post a comment.