Join Tables without DataRelation object

  • Thread starter Thread starter Steve Bishop
  • Start date Start date
S

Steve Bishop

I am use to working with only single tables with my command object. Now
I have 2 tables that need a 1 to 1 relationship. Is it possible to inner
join 2 tables in my SQL statement before thowing the data into the
DataSet?? I'm trying to avoid the DataRelation object.

Also, all the examples I have show using the data grid and no form
fields to display data. I would like to read some of the records into
Web Server controls like text boxes. Example appreciated. Thanks.
Steve
 
Steve,

You can perform an inner join of the data before it hits the DataSet
instance. However, you will have problems updating your data source, because
the DataSet will have no way of knowing how the data is joined without the
data split into two DataTable instances and the DataRelation object. I guess
you could work some server side functionality such as Stored Procedures (I
don't know the format of your back-end database) to retrieve and update the
data.
 
Back
Top