Microsoft Visual Basic 2010 Step by Step eBook

(Tina Meador) #1

452 Part IV Database and Web Programming


in a dataset, such as the length of database fields and the data types associated with
fields.


  1. Click the Last Name field, and then press F4 to highlight the Properties window.

  2. Click the MaxLength property. Your screen looks similar to the following screen shot:


Here the Dataset Designer is shown with an active dataset named Faculty2010DataSet,
and the Properties window shows that the MaxLength property is set to allow for
a maximum of 50 characters in the Last Name field. Although this length seems
sufficient, you can adjust this property (and others, too) if you find that the underlying
database settings are inadequate for your application.
Setting the Dataset Designer aside for a moment, let’s continue building the sample database
application in the Data Sources window.

The Data Sources Window


The Data Sources window is a useful and timesaving feature of the Visual Studio 2010 IDE.
Its purpose is to display a visual representation of the datasets that have been configured
for use within your project, and to help you bind these datasets to controls on the form.
Remember that a dataset is just a temporary representation of database information in your
Free download pdf