how to check if a datareader is null or empty

前端 未结 12 1757
谎友^
谎友^ 2020-12-24 01:52

I have a datareader that return a lsit of records from a sql server database. I have a field in the database called "Additional". This field is 50% of the time emp

12条回答
  •  遥遥无期
    2020-12-24 02:37

    @Joe Philllips

    SQlDataReader.IsDBNull(int index) requires the ordinal number of the column. Is there a way to check for nulls using Column Name, and not it's Ordinal Number?

提交回复
热议问题