thx this works 100%
But why does ADO make it so complex to use DataReader["fieldname"] for
fetching the field values? It is as if it wants me by default to get them by
DataReader(field number) but this field number could so easily change if the
sql query is changed and ... an error would be produced. Am I missing
something?
"Kai Brinkmann [MSFT]" <ka******@online.microsoft.com> wrote in message
news:uw**************@TK2MSFTNGP09.phx.gbl...
Try
... = MyDataReader.GetBoolean(MyDataReader.GetOrdinal("I sLocked"));
--
Kai Brinkmann [MSFT]
Please do not send e-mail directly to this alias. This alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no
rights.
"Daves" <db****@simnet.is> wrote in message
news:OU**************@TK2MSFTNGP09.phx.gbl... trying to get a boolean value from DataReader (that is, result from a SQL
query);
boolean MyBool = MyDataReader.GetBoolean(3);
well it works using that number 3 but of course I would like to do
something like
... = MyDataReader.GetBoolean["IsLocked"];
since I don't always know the field number of the IsLocked field. Why is
this so complicated and what is the best solution??