In the case of an empty data reader, I want field names with empty values ββto be displayed. Those.
Product: - Price: -
So, are IDataReader.GetName (i) and IDataReader.FieldCount safe to use when they have no results?
In fact, I just experienced this myself, running the reader against an empty set. Then without calling Read (); I successfully crash FieldCount and GetName (i) for all columns, while the data reader had 0 rows.