string query =
"SELECT * FROM table1, table2 WHERE table1.Id = table2.fId";
...
using(IDataReader dataReader =
db.ExecuteReader(CommandType.Text, query))
..
string value = dataReader["table2.field"]; //dies
I'm currently writing some .NET code which involves executing a join query and then accessing the returned data using a DataReader. I am wondering if it is possible to access fields from the returned rows using some sort of prefix notation (see example above) instead of having to use the ordinal position to access a value in the row (in the case where both tables contain overlapping field names)?