Desi Gal

Desi Gal

  • NA
  • 35
  • 0

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

Aug 17 2009 11:53 AM
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)