Reader.Item("Column_name")
Or
Reader("Column_name")
Don't think there's any differance really.. depends on what you think its
easier to read I guess!
But When you use GetString.. you can't really use the columnnames and you
are stuck with typing the ColumnIndex.. and sometimes that's bad if you
would to change the number or order of columns in the database..
/Lars Netzel
"Agnes" <ag***@dynamictech.com.hk> skrev i meddelandet
news:OX***************@tk2msftngp13.phx.gbl...
i will select over 30 fieldsname from myTable.
If i use datareader, my way to get the result is (loop - the datareader)
and strResult = myReader.getstring(12) .
Can I use the itemname to get the result ??/
Thanks