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

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -