Use strongly typed datasets.
Methods for testing and setting fields to null are automatically generated; eg. IsRoleKeyNull() / SetRoleKeyNull()
>I'm doing this:
>
>
>_RoleKey = (int)dsDataSet.Tables[0].Rows[0]["RoleKey"];
>
>
>It's throwing an exception because RoleKey is null in the data. How do I handle this?