Hi all,
I am stuck with this problem.
the code is like this:
Dim sqlreader As SqlDataReader =
myCommand.Execu teReader(Comman dBehavior.Close Connection)
sqlreader.GetVa lue(sqlreader.G etOrdinal(colum nname) give me the following in
the watch window:
sqlreader.GetVa lue(sqlreader.G etOrdinal("enro lldate")) Run-time exception
thrown : System.InvalidO perationExcepti on - Invalid attempt to read when no
data is present.
But I can get the column number: sqlreader.GetOr dinal("enrollda te") is 1.
What's going on?
Thank you.
Betty
--
Betty
I am stuck with this problem.
the code is like this:
Dim sqlreader As SqlDataReader =
myCommand.Execu teReader(Comman dBehavior.Close Connection)
sqlreader.GetVa lue(sqlreader.G etOrdinal(colum nname) give me the following in
the watch window:
sqlreader.GetVa lue(sqlreader.G etOrdinal("enro lldate")) Run-time exception
thrown : System.InvalidO perationExcepti on - Invalid attempt to read when no
data is present.
But I can get the column number: sqlreader.GetOr dinal("enrollda te") is 1.
What's going on?
Thank you.
Betty
--
Betty
Comment