C# SQL Data Adapter System.Data.StrongTypingException C# SQL Data Adapter System.Data.StrongTypingException sql sql

C# SQL Data Adapter System.Data.StrongTypingException


When you get the value of a row/column in a typed dataset, by default it raises this exception when the value is DBNull.So

string x = Row.CategoryName;//Raises this exception when CategoryName is null.

You can correct this with the typed dataset designer.
Set the property "Nullvalue" of the CategroyName column to "(Empty)"