Database Reference
In-Depth Information
Try It: Getting Schema Information
Here you'll see a practical demonstration of the GetSchemaTable method.
1. Select the DataReader project, right-click, and choose Add Windows Form.
From the opened dialog, make sure the Windows form is selected and rename
Form1.cs to SchemaTable.cs, and click OK to add this form to the DataReader
project.
2. Select the SchemaTable form, and set the Size property's Width to 378 and
Height to 459.
3. Drag a TextBox control to the form, and position it toward the middle of the
form. Select this TextBox control, navigate to the Properties window, and set
the following properties:
Set the Name property to txtSchema.
Set the Location property's X to 12 and Y to 12.
Set the Multiline property to True.
Set the ScrollBars property to Vertical.
Set the Size property's Width to 392 and Height to 333.
4. Now your SchemaTable form in the Design view should look like Figure 14-9.
Figure 14-9. The Design view of the SchemaTable form
 
Search WWH ::




Custom Search