Add fixed field in a DataReader

  • Thread starter Thread starter Luigi
  • Start date Start date
L

Luigi

Hi all,
having a DataReader populater with an Excel file, how can add a column with
a fixed value to it?

For example, having DbDataReader dr = cmd.ExecuteReader()

I need to add another column to it.

Thanks a lot.

Luigi
 
Hi all,
having a DataReader populater with an Excel file, how can add a column
with a fixed value to it?

For example, having DbDataReader dr = cmd.ExecuteReader()

I need to add another column to it.

How do you add food coloring to water coming out of a firehose?

Answer: You don't.

A DataReader is a firehose cursor, so much like trying to add food
coloring to water during a fire, you can't add to it.

In short: You cannot add a column to the cursor. You can, however, add
information as you pull records from the cursor.

With a DataSet, you have more options, as you can add a column.

Do you want to know how to add data as you pull from the DataReader?

Peace and Grace,


--
Gregory A. Beamer (MVP)

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

*******************************************
| Think outside the box! |
*******************************************
 
//How do you add food coloring to water coming out of a firehose?//

Good illustration! , I'll add that one to "the bag o' tricks" (for
explaining it to someone).

.......
 
//How do you add food coloring to water coming out of a firehose?//

Good illustration! , I'll add that one to "the bag o' tricks" (for
explaining it to someone).

Analogies help us picture things. here is another one you might like.

Years ago, I had someone telling me "FrontPage sucks" because I
suggested he was coding and needed a tool like InterDev. My answer is
"hammers suck when you want to screw in a screw".

Peace and Grace,

--
Gregory A. Beamer (MVP)

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

*******************************************
| Think outside the box! |
*******************************************
 
Now if we can only teach builders that.


Gregory A. Beamer said:
Analogies help us picture things. here is another one you might like.

Years ago, I had someone telling me "FrontPage sucks" because I
suggested he was coding and needed a tool like InterDev. My answer is
"hammers suck when you want to screw in a screw".

Peace and Grace,

--
Gregory A. Beamer (MVP)

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

*******************************************
| Think outside the box! |
*******************************************
 
Now if we can only teach builders that.

The educational aspect of change takes years, unless there is an
overwhelming din from the masses. :-0

Peace and Grace,

--
Gregory A. Beamer (MVP)

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

*******************************************
| Think outside the box! |
*******************************************
 
Back
Top