Hi All,
What is the Difference between DataReader[ColumnName] and DataReader.GetV alue() .
I have one Sp which returns an out param and one cursor .while reading the first outparam by using dataReader[column_Name] it is throwing exception ,but with the help of DataReader.GetV alue(0) am able to read this value.
What I believe is I should not get exception in first case also.
can someone clarify me y do we need to use GeValue(0) in case of single Parameter.
If I acess through dataReader[Param-Name] it is throwing Exception as "System.IndexOu tOfRange Exception".
What is the Difference between DataReader[ColumnName] and DataReader.GetV alue() .
I have one Sp which returns an out param and one cursor .while reading the first outparam by using dataReader[column_Name] it is throwing exception ,but with the help of DataReader.GetV alue(0) am able to read this value.
What I believe is I should not get exception in first case also.
can someone clarify me y do we need to use GeValue(0) in case of single Parameter.
If I acess through dataReader[Param-Name] it is throwing Exception as "System.IndexOu tOfRange Exception".