I have a situation where previously a simple DataTable worked (because I was using an DataAdapter that only hit one table in my relation system). Recently however I’m joining three tables (done in the query that gets sent to my rdb) and it looks can only access one via a DataTable.
Is there a way to iterate over some universal row (i.e. one row that has columns of all tables joined via a foreign key link) element in a DataSet?
Also currently all of this data from three tables is getting put into a single DataTable via OdbcDataAdapter.Fill(myDataTable). I would really like to be able to do something like:
string s1 = myDataTable.Rows[i]["table1.someCol"],
s2 = myDataTable.Rows[i]["table2.someCol"];
Are either of these possible, and if not how should one handle this situation? Thanks in advance.
The main problem was that among these several tables there were some columns with the same names. I just distinguished them in the query by doing:
This way I don’t have to do anything in the c# code because I can now access them directly from a single DataTable.