O'Reilly logo

Visual Basic® .NET Database Programming by Rod Stephens

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

DataRelation

The DataRelation object represents a relationship between columns in a child table and columns in a parent table. Often there is a simple one-to-one mapping between the columns. For example, suppose the Customers table contains general customer information and the CustomerAddresses table contains the customers’ addresses (mailing address, billing address, shipping address, and so forth). A common CustomerId field links the two tables. In this example, the DataRelation contains references to the CustomerId fields in the two tables. The following code shows how a program might create this relation:

 customer_addresses_relation = New DataRelation( _ "Customers_Addresses", _ addresses_table.Columns("CustomerId"), _ customers_table.Columns("CustomerId")) ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required