K
K Viltersten
I have a data reader and it executes a query where
one of the joined tables is called Monkey,
containing a column called Donkey. One way to
refer to it is as follows (it's 5:th in order).
SqlDataReader dr = getBlobb();
bool b = dr.GetBoolean(5);
However, i'd like to use an other form, namely
reference by string. I've tried the following but
only got an error about index going cuckoo.
SqlDataReader dr = getBlobb();
bool b = (bool)dr["Monkey.Donkey"];
It usually works, when i don't have any dots in
the reference, so i'm suspecting it has to do
with it. Am i right? How to work it?
one of the joined tables is called Monkey,
containing a column called Donkey. One way to
refer to it is as follows (it's 5:th in order).
SqlDataReader dr = getBlobb();
bool b = dr.GetBoolean(5);
However, i'd like to use an other form, namely
reference by string. I've tried the following but
only got an error about index going cuckoo.
SqlDataReader dr = getBlobb();
bool b = (bool)dr["Monkey.Donkey"];
It usually works, when i don't have any dots in
the reference, so i'm suspecting it has to do
with it. Am i right? How to work it?