I have SqlDataReader
that gets returned from a ExecuteDataReader
statement.
All I want is: change some column name in the data reader, just before binding to grid.
Here's the situation:
Here is the problem: if one column in the stored procedure is in upper case and related column in the grid is in lower case, the grid does not fill.
And I have a lot of stored procedures based on this architecture. Some of them have many rows to display. And because of that I use data reader for performance.
I just one way to change the column name of the data reader
sqlDataReader reader; reader.executedatareadet();
For example after data reader is returned I have two columns (A,B
).
I want to change column 'A'
to 'a'
(convert to lower case) before binding it to the grid like reader.GetName(i)
I want to be able to do something like
reader.SetName(i)
but it seams that we cant change the data reader column name
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With