Reputation: 1
I want to retrieve field names from a SQL statement. For example, if I have:-
SELECT a, tbl.b, [tbl.s]
FROM tbl
I'd like to retrieve::
I'd need to do it via any database object.
Upvotes: 0
Views: 1279
Reputation: 457
Using the SqlDataReader Class you can do:
Reader.GetName(columnNumber)
and that will return the column name.
Upvotes: 2