4
Answers

Unable to cast object of type 'System.DBNull' to type 'System.String'. while saving in the database

Ask a question
Desi Gal

Desi Gal

15y
11.7k
1
I am trying to manually create a strongly typed  data row

DataSet.PersonRow personRow;
personRow=dataset.Person.NewPersonARow();

personRow.MiddleName=(string)GridView.GetFocusedRowCell("Middlename");
Unable to cast object of type 'System.DBNull' to type 'System.String'. while saving in the database

Answers (4)