.NET ADO.NET - How can we add relation’s between table in a DataSet
Interview Question Database For Software Developers
|
|
| How can we add relation’s between table in a DataSet | | How can we add relation’s between table in a DataSet ? | | By: |
Dim objRelation As DataRelation
objRelation=New
DataRelation("CustomerAddresses",objDataSet.Tables("Customer").Columns("Custid")
,objDataSet.Tables("Addresses").Columns("Custid_fk"))
objDataSet.Relations.Add(objRelation)
Relations can be added between “DataTable” objects using the “DataRelation” object.
Above sample code is trying to build a relationship between “Customer” and “Addresses”
“Datatable” using “CustomerAddresses” “DataRelation” object.
| | ID: 1813 | Rank: 936 | Votes: 0 | Views: 74 | Submitted: 20071024 |
Copyright © 2009 FYIcenter.com
All rights in the contents of this Website are reserved by the individual author.
No part of the contents may be reproduced in any form without author's permission.
|
|
|