Great question! It made me work a little, due to the vague memory that it was put up somewhere. Of course:
=DataSets("TopEmployees").CommandText
or better yet
=DataSets("MyDataSet").RewrittenCommandText
The second option will include parameter substitution.
Keep in mind that this can lead to security issues if someone can find an SQL injection attack through this ...
Source: http://msdn.microsoft.com/en-us/library/dd255235.aspx
source share