How do you create a foreign key relationship in a SQL Server CE (Compact Edition) Database?

前端 未结 7 842
闹比i
闹比i 2021-02-04 23:44

Visual Studio 2005 doesn\'t provide an interface for creating relationships between tables in a SQL Server CE database (I\'m using version 3.0) and you can\'t open a Compact Edi

7条回答
  •  没有蜡笔的小新
    2021-02-05 00:34

    I know it's a "very long time" since this question was first asked. Just in case, if it helps someone,

    Adding relationships is well supported by MS via SQL Server Compact Tool Box (https://sqlcetoolbox.codeplex.com/). Just install it, then you would get the option to connect to the Compact Database using the Server Explorer Window. Right click on the primary table , select "Table Properties". You should have the following window, which contains "Add Relations" tab allowing you to add relations.

    Add Relations Tab - SQL Server Compact Tool Box

提交回复
热议问题