DataRowCollection.Add in .NET 2
my name is Iram.
I'm upgrading my winform application which was developed
in .NET 1.1 to .NET 2.
There is a code section that works well in .NET 1.1, but in .NET 2 raises an Exception of:{"Object reference not set to an instance of an object."} System.Exception {System.NullReferenceException}
The code is:
DataRowCollection rc;
DataRow newSearchRow;
rc = searchQuestions.Rows;
newSearchRow = searchQuestions.NewRow();
newSearchRow[1] = 0;
newSearchRow[4] = "Search Questions";
rc.Add(newSearchRow); <--This row execute the Exception
Explanation: The 'searchQuestions' is an instance of an object that I wrote that inheritance from DataTable and has several columns.
Does any one have any suggestion?
Iram

