Tuesday, June 14, 2016

Use IsDBNull to see if a column coming back from a sproc has data at all for a given row in C#.

More or less like this, but a bit different...

x = !Convert.IsDBNull(dataRow["X"]) ? Convert.ToString(dataRow["X"]) : null;

No comments:

Post a Comment