See the DataRelation class in the .NET BCL. It's pretty straight-forward and easy to make a typed DataSet by right-clicking on your project (or a folder under your project, which helps set the default namespace for your source files you add to them) and adding a new type, then choose DataSet. You can even drag and drop tables, views, and stored procedures from the server explorer to create elements (the DataSet designer is, after all, just the XML schema designer) that represent tables, while their elements represent fields. You can create primary keys and draw relationships. When you save this, it serializes using the CodeDomSerializer so that you have source code. When you use it, instead of using DataSet ds = new DataSet();, for example, you would use MyDataSet ds = new MyDataSet();. That already has typed table and fiend names, as well as relationships established. Note, however, that the DataAdapter derivatives - or rather the command builders like SqlCommandBuilder - don't support auto-generation of complex statements required for updating a data source with changes. All this is programmatic changes you can do manually, as well. It's most important to read the documentation, but you might also makes a typed DataSet in this manner and examine the source code (click "Project->Show Hidden Files" in the menu to see the source file itself). This posting is provided "AS IS" with no warranties, and confers no rights. Software Design Engineer Developer Division Sustained Engineering Microsoft [My Articles] [My Blog]