Database Reference
In-Depth Information
Try It: Using the ExecuteNonQuery Method
To use the ExecuteNonOuery method, follow these steps:
1. Select the ADO.NET_Command project, right-click, and choose Add
Windows Form. From the opened dialog, make sure Windows Form is selected
and rename Form1.cs to CommandNonQuery.cs . Click OK to add this form to the
ADO.NET_Command project.
2. Select the CommandNonQuery form by clicking the form's title bar, and set
the Size property's Width to 297 and Height to 277.
3. Drag a GroupBox control to the form and position it toward the left side of the
form. Select the GroupBox control, navigate to the Properties window, and set
the following properties:
Set the Name property to gbInsertCurrency.
Set the Location property's X to 21 and Y to 22.
Set the Size property's Width to 240 and Height to 201.
Set the Text property to Insert Currency.
4. Drag a Label control to the GroupBox named gbInsertCurrency, and position it
toward the left side of the GroupBox. Select this Label control, navigate to the
Properties window, and set the following properties:
Set the Name property to lblCurrencyCode.
Set the Location property's X to 16 and Y to 30.
Set the Size property's Width to 77 and Height to 13.
Set the Text property to Currency Code.
5. Drag a TextBox control to the form, and position it next to the Label control
called Currency Code. Select this TextBox control, navigate to the Properties
window, and set the following properties:
Set the Name property to txtCurrencyCode.
Set the Location property's X to 99 and Y to 30.
Set the Size property's Width to 128 and Height to 20.
Leave the Text property blank.
6. Drag another Label control to the GroupBox called gbInsertCurrency, and
position it below the Currency Code label toward the left side of the GroupBox.
Select this Label control, navigate to the Properties window, and set the
following properties:
Set the Name property to lblName.
Set the Location property's X to 19 and Y to 64.
 
Search WWH ::




Custom Search