|
There are various ways you can create a table adapter:
- If
you had added a data source to your application and created a binding source, to
create a table adapter, under the form, you can click the binding source object.
In the Properties window, click the DisplayMember field and, from its combo,
select the name of the table:

After doing this, Microsoft Visual Studio would create a table adapter. You
can then accept or change its name
- Probably the best way to create a table adapter consists of generating
it from the Data Source window. To do this, after creating a data source,
from the Data Source window, you can drag the table node and drop it on the
form

After dropping the table, Microsoft Visual Studio would create both a data
set and a table adapter.
|
Practical Learning: Creating a Table Adapter
|
|
- While the binding source is still selected under the form, in the
Properties window, click DataMember and click the arrow its combo box to
select RentalProperties
- Under the form, click rentalPropertiesTableAdapter and, in the
Properties window, change its Name to tadRentalProperties
- Save the form
|
|