---
title: "how we make datarealation"  
description: "how we make datarealation"  
author: "Amit Singh"  
published: 2010-10-02  
updated: 2013-04-14  
canonical: https://www.mindstick.com/forum/13/how-we-make-datarealation  
category: "ado.net"  
tags: ["ado.net"]  
reading_time: 1 minute  

---

# how we make datarealation

how we create DataRelation ?\
please give the appropriate syntax with Example

## Replies

### Reply by Shankar M

Hi amit,\
Have a look at this link,\
[http://msdn.microsoft.com/en-us/library/y8c0cxey.aspx](http://msdn.microsoft.com/en-us/library/y8c0cxey.aspx)\
Thanks,Shankar

### Reply by Uttam Misra

```
'Create the Data Relationship in VB.NET
 ds.Relations.Add("RelationName",ds.Tables("Employee").Columns("EmployeeID"),
 ds.Tables("EmployeeDetails").Columns("EmployeeID"))
 'ds.Tables("Employees").Columns("EmployeeID") [First table name "Employee"]
 'ds.Tables("EmployeeDetails").Columns("EmployeeID") [Second table name "EmployeeDetails"]


```


---

Original Source: https://www.mindstick.com/forum/13/how-we-make-datarealation

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
