c# - determine if a field is returned from a datareader -
I'm dynamically selecting a table to select and a field that is not present on all tables. Inside the reader, how can I see if this area is present in the collection or not?
I am using it, but it only determines whether it is zero ... No, whether it exists or not:
if (myReader .GetValue (myReader.GetOrdinal ("prepay")! = DB.NLL.value) myModel.PrePay = myReader.GetBoolean (myReader.GetOrdinal ("prepay"); Take a look at
(MyReader is a SqlDataReader to handle).
Comments
Post a Comment