Making progress here...
Ok, so I turn on Option Strict which forces me to explicitly get a string,
integer, whatever value from the DataReader, as you show below.
This means I can't use the field name as a reference, right, I must use the
ordinal positional value. I have two issues with that, and tell me if I'm
off base here.
1. Ordinal values are not self-documenting, i.e.
InvoiceDataReader.GetString(0) tells me only that I'm pulling from the first
field. InvoiceDataReader("Invoice") tells me much more. Especially 6 months
down the line when I haven't looked at the code for awhile...
2. Were the order of columns, or additional columns inserted, due to
buisness needs, I would have to adjust all or some of my ordinal references
to match the updated column order.
Certainly #1 is easily resolved by commenting my code
i.e.
InvoiceDataReader.GetString(0) '<----Invoice Number
Nevertheless...do I have a point? I'm not discounting anyone's advice
certainly. Just discussing the merits. Are we talking fractions of a second
in difference of performance?
Thanks
use
the