You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/data-tools/create-lookup-tables-in-windows-forms-applications.md
+9-9Lines changed: 9 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -19,14 +19,14 @@ The term *lookup table* describes controls that are bound to two related data ta
19
19
20
20
You can create lookup tables by dragging the main node of a parent table (from the [Data Sources Window](add-new-data-sources.md)) onto a control on your form that is already bound to the column in the related child table.
21
21
22
-
For example, consider a table of `Orders` in a sales database. Each record in the `Orders` table includes a `CustomerID`, indicating which customer placed the order. The `CustomerID` is a foreign key pointing to a customer record in the `Customers` table. In this scenario, you expand the `Orders` table in the **Data Sources** window and set the main node to **Details**. Then set the `CustomerID` column to use a <xref:System.Windows.Forms.ComboBox> (or any other control that supports lookup binding), and drag the `Orders` node onto your form. Finally, drag the `Customers` node onto the control that is bound to the related column — in this case, the <xref:System.Windows.Forms.ComboBox> bound to the `CustomerID` column.
22
+
For example, consider a table of `Orders` in a sales database. Each record in the `Orders` table includes a `CustomerID`, indicating which customer placed the order. The `CustomerID` is a foreign key pointing to a customer record in the `Customers` table. In this scenario, you expand the `Orders` table in the **Data Sources** window and set the main node to **Details**. Then, set the `CustomerID` column to use a <xref:System.Windows.Forms.ComboBox> (or any other control that supports lookup binding), and drag the `Orders` node onto your form. Finally, drag the `Customers` node onto the control that is bound to the related column — in this case, the <xref:System.Windows.Forms.ComboBox> bound to the `CustomerID` column.
23
23
24
24
## To databind a lookup control
25
25
26
26
1. Open the **Data Sources** window.
27
27
28
28
> [!NOTE]
29
-
> Lookup tables require that two related tables or objects are available in the **Data Sources** window. For more information, see [Relationships in Datasets](relationships-in-datasets.md).
29
+
> Lookup tables require that two related tables or objects are available in the **Data Sources** window. For more information, see [Relationships in datasets](relationships-in-datasets.md).
30
30
31
31
2. Expand the nodes in the **Data Sources** window until you can see the parent table and all of its columns, and the related child table and all of its columns.
32
32
@@ -35,22 +35,22 @@ The term *lookup table* describes controls that are bound to two related data ta
35
35
36
36
3. Change the drop type of the child table to **Details** by selecting **Details** from the control list on the child table's node. For more information, see [Set the control to be created when dragging from the Data Sources window](../data-tools/set-the-control-to-be-created-when-dragging-from-the-data-sources-window.md).
37
37
38
-
4. Locate the node that relates the two tables (the `CustomerID` node in the previous example).Change its drop type to a <xref:System.Windows.Forms.ComboBox> by selecting **ComboBox** from the control list.
38
+
4. Locate the node that relates the two tables (the `CustomerID` node in the previous example).Change its drop type to a <xref:System.Windows.Forms.ComboBox> by selecting **ComboBox** from the control list.
39
39
40
40
5. Drag the main child table node from the **Data Sources** window onto your form.
41
41
42
42
Databound controls (with descriptive labels) and a tool strip (<xref:System.Windows.Forms.BindingNavigator>) appear on the form. A [DataSet](../data-tools/dataset-tools-in-visual-studio.md), [TableAdapter](../data-tools/create-and-configure-tableadapters.md), <xref:System.Windows.Forms.BindingSource>, and <xref:System.Windows.Forms.BindingNavigator> appear in the component tray.
43
43
44
-
6. Now drag the main parent table node from the **Data Sources** window directly onto the lookup control (the <xref:System.Windows.Forms.ComboBox>).
44
+
6. Now, drag the main parent table node from the **Data Sources** window directly onto the lookup control (the <xref:System.Windows.Forms.ComboBox>).
45
45
46
-
The lookup bindings are now established. Refer to the table below for the specific properties that were set on the control.
46
+
The lookup bindings are now established. Refer to the following table for the specific properties that were set on the control.
47
47
48
48
|Property|Explanation of setting|
49
49
|--------------|----------------------------|
50
-
|**DataSource**|Visual Studio sets this property to the <xref:System.Windows.Forms.BindingSource> created for the table you drag onto the control (as opposed to the <xref:System.Windows.Forms.BindingSource> created when the control was created).<br /><br /> If you need to make an adjustment, then set this to the <xref:System.Windows.Forms.BindingSource> of the table with the column you want to display.|
51
-
|**DisplayMember**|Visual Studio sets this property to the first column after the primary key that has a string data type for the table you drag onto the control.<br /><br /> If you need to make an adjustment, then set this to the column name you want to display.|
52
-
|**ValueMember**|Visual Studio sets this property to the first column participating in the primary key, or the first column in the table if no key is defined.<br /><br /> If you need to make an adjustment, then set this to the primary key in the table with the column you want to display.|
53
-
|**SelectedValue**|Visual Studio sets this property to the original column dropped from the **Data Sources** window.<br /><br /> If you need to make an adjustment, then set this to the foreign-key column in the related table.|
50
+
|**DataSource**|Visual Studio sets this property to the <xref:System.Windows.Forms.BindingSource>, created for the table you drag onto the control (as opposed to the <xref:System.Windows.Forms.BindingSource>, created when the control was created).<br /><br /> If you need to make an adjustment, set this to the <xref:System.Windows.Forms.BindingSource> of the table with the column you want to display.|
51
+
|**DisplayMember**|Visual Studio sets this property to the first column after the primary key that has a string data type for the table you drag onto the control.<br /><br /> If you need to make an adjustment, set this to the column name you want to display.|
52
+
|**ValueMember**|Visual Studio sets this property to the first column participating in the primary key, or the first column in the table if no key is defined.<br /><br /> If you need to make an adjustment, set this to the primary key in the table with the column you want to display.|
53
+
|**SelectedValue**|Visual Studio sets this property to the original column dropped from the **Data Sources** window.<br /><br /> If you need to make an adjustment, set this to the foreign-key column in the related table.|
Copy file name to clipboardExpand all lines: docs/data-tools/create-parameterized-tableadapter-queries.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -59,7 +59,7 @@ A parameterized query returns data that meets the conditions of a WHERE clause w
59
59
> [!NOTE]
60
60
> If **Add Query** is not available on the **Data** menu, select a control on the form that displays the data source you want to add the parameterization to. For example, if the form displays data in a <xref:System.Windows.Forms.DataGridView> control, select it. If the form displays data in individual controls, select any data-bound control.
61
61
62
-
3. In the **Select data source table** area, select the table that you want to add parameterization to.
62
+
3. In the **Select data source table** area, select the table to which you want to add parameterization.
63
63
64
64
4. Type a name in the **New query name** box if you are creating a new query.
Copy file name to clipboardExpand all lines: docs/data-tools/creating-and-managing-databases-and-data-tier-applications-in-visual-studio.md
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -17,11 +17,11 @@ ms.workload:
17
17
- "data-storage"
18
18
---
19
19
# Database projects and data-tier applications in Visual Studio
20
-
You can use database projects to create new databases, new data-tier applications (DACs), and to update existing databases and data-tier applications. Both database projects and DAC projects enable you to apply version control and project management techniques to your database development efforts in much the same way that you apply those techniques to managed or native code. You can help your development team manage changes to databases and database servers by creating a *DAC project*, *database project*, or a *server project* and putting it under version control. Members of your team can then check out files to make, build, and test changes in an *isolated development environment*, or sandbox, before sharing them with the team. To help ensure code quality, your team can finish and test all changes for a particular release of the database in a staging environment before you deploy the changes into production.
20
+
You can use database projects to create new databases, new data-tier applications (DACs), and to update existing databases and data-tier applications. Both database projects and DAC projects enable you to apply version control and project management techniques to your database development efforts in much the same way that you apply those techniques to managed or native code. You can help your development team manage changes to databases and database servers by creating a DAC project, database project, or a server project and putting it under version control. Members of your team can then check out files to make, build, and test changes in an isolated development environment, or sandbox, before sharing them with the team. To help ensure code quality, your team can finish and test all changes for a particular release of the database in a staging environment before you deploy the changes into production.
21
21
22
-
For a list of the database features that are supported by Data-tier Applications, see [Features Supported in Data-tier Applications](http://go.microsoft.com/fwlink/?LinkId=164239) on the Microsoft web site. If you use features in your database that are not supported by Data-tier Applications, you should instead use a database project to manage changes to your database.
22
+
For a list of the database features that are supported by Data-tier Applications, see [Features supported in data-tier applications](http://go.microsoft.com/fwlink/?LinkId=164239) on the Microsoft web site. If you use features in your database that are not supported by Data-tier Applications, you should instead use a database project to manage changes to your database.
Copy file name to clipboardExpand all lines: docs/data-tools/customize-how-visual-studio-creates-captions-for-data-bound-controls.md
+7-7Lines changed: 7 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -23,23 +23,23 @@ When you drag items from the [Data Sources Window](add-new-data-sources.md) onto
23
23
> [!NOTE]
24
24
> This registry key does not exist until you create it.
25
25
26
-
Smart captioning is controlled by the regular expression entered into the value of the **SmartCaptionExpression** value. Adding the **Data Designers** registry key overrides the default regular expression that controls caption labels. For more information about regular expressions, see [Using Regular Expressions in Visual Studio](../ide/using-regular-expressions-in-visual-studio.md).
26
+
Smart captioning is controlled by the regular expression entered into the value of the **SmartCaptionExpression** value. Adding the **Data Designers** registry key overrides the default regular expression that controls caption labels. For more information about regular expressions, see [Using regular expressions in Visual Studio](../ide/using-regular-expressions-in-visual-studio.md).
27
27
28
28
The following table describes the registry values that control caption labels.
29
29
30
30
|Registry item|Description|
31
31
|-------------------|-----------------|
32
-
|**SmartCaptionExpression**|The regular expression used to match your patterns.|
32
+
|**SmartCaptionExpression**|The regular expression you use to match your patterns.|
33
33
|**SmartCaptionReplacement**|The format to display any groups matched in the **SmartCaptionExpression**.|
34
34
|**SmartCaptionSuffix**|An optional string to append to the end of the caption.|
35
35
36
36
The following table lists the internal default settings for these registry values.
|**SmartCaptionExpression**|(\\\p{Ll})(\\\p{Lu})|_+|Matches a lowercase character followed by an uppercase character or an underscore.|
41
-
|**SmartCaptionReplacement**|$1 $2|The $1 represents any characters matched in the first parentheses of the expression, and the $2 represents any characters matched in the second parentheses. The replacement is the first match, a space, and then the second match.|
42
-
|**SmartCaptionSuffix**|:|Represents a character appended to the returned string. For example, if the caption is `Company Name`, the suffix makes it `Company Name:`|
40
+
|**SmartCaptionExpression**|**(\\\p{Ll})(\\\p{Lu})|_+**|Matches a lowercase character followed by an uppercase character or an underscore.|
41
+
|**SmartCaptionReplacement**|**$1 $2**|The **$1** represents any characters matched in the first parentheses of the expression, and the **$2** represents any characters matched in the second parentheses. The replacement is the first match, a space, and then the second match.|
42
+
|**SmartCaptionSuffix**|**:**|Represents a character appended to the returned string. For example, if the caption is `Company Name`, the suffix makes it `Company Name:`|
43
43
44
44
> [!CAUTION]
45
45
> You should be very careful when doing anything in the Registry Editor. Back up the registry before editing it. If you use the Registry Editor incorrectly, you can cause serious problems that may require you to reinstall your operating system. Microsoft does not guarantee that problems that you cause by using the Registry Editor incorrectly can be resolved. Use the Registry Editor at your own risk.
@@ -52,7 +52,7 @@ The following table lists the internal default settings for these registry value
52
52
53
53
2. Type `regedit` in the **Run** dialog box, and click **OK**.
54
54
55
-
3. Expand the **HKEY_CURRENT_USER**, **Software**, **Microsoft**,**VisualStudio** node.
55
+
3. Expand the **HKEY_CURRENT_USER** > **Software** > **Microsoft** >**VisualStudio** node.
56
56
57
57
7. Right-click the **15.0** node, and create a new **Key** named `Data Designers`.
58
58
@@ -82,7 +82,7 @@ The following table lists the internal default settings for these registry value
82
82
83
83
2. Type `regedit` in the **Run** dialog box, and click **OK**.
84
84
85
-
3. Expand the **HKEY_CURRENT_USER**, **Software**, **Microsoft**,**VisualStudio** node.
85
+
3. Expand the **HKEY_CURRENT_USER** > **Software** > **Microsoft** >**VisualStudio** node.
86
86
87
87
7. Right-click the **15.0** node, and create a new **Key** named `Data Designers`.
0 commit comments