Partilhar via


Tables Collection Editor

Allows you to add and remove DataTable objects to or from an untyped dataset.This dialog box appears when you are using the Properties window to edit the Tables property of an untyped dataset on a form or component.

O editor é dividido em dois painéis.In the left pane you add and remove DataTable objects, and in the right pane you set properties for an individual table, including:

  • TableName property, by which you can refer to the table in code.

  • Adding and removing columns.You do this by editing the table's Columns collection, which displays the Columns Collection Editor.

  • Defining the table's primary key (after creating columns).You can do this by editing a table's PrimaryKey property and choosing the parts of the key from the drop-down list of columns.

  • Adding and removing constraints.A unique constraint guarantees that there are no duplicates in a specific column and allows you to define a primary key.A foreign key constraint allows you to define referential integrity between a parent and child table.

    A table can have multiple constraints, each of which is stored as a Constraint object in the table's Constraints collection.When you edit the table's Constraints property, the Constraints Collection Editor is displayed where you can add and remove individual constraints.

  • Adicionar
    Creates a new DataTable object in the collection.By default, the table is named dataTablen, where n is a sequential number.You can rename the table by setting its TableName property in the properties grid.

  • Remove
    Deletes the selected table from the dataset.

Consulte também

Outros recursos

Criando e usando DataTables

Guia de Introdução para acesso a dados

Conectando-se a Dados no Visual Studio

Preparando seu aplicativo para receber dados

Buscando dados em seu aplicativo

Exibindo dados em formulários em aplicativos do Windows

Editar dados no seu aplicativo

Validando Dados

Salvando dados