I've posted a related question is in the ArcGIS Desktop forums, but hasn't gotten any replies yet. In that case, I would like tackle this in another way, which is dynamically changing a datasource using arcgis js api. Is this possible?
To give some detail, the layers defined in my mapservice are joined with another view through oledb. Will the class QueryDataSource be able to do this, and how?