danielolorenz
asked on
Object Reference not set to an Instance of an Object
CSS.SSD.Request.CaseLoadDa ta[] data1 = new CSS.SSD.Request.CaseLoadDa ta[1];
// XMLRequest test data
data1[0].Action = "UPDATE/CLOSE";
data1[1].Action = "CREATE";
Right when the code gets to data1[0].Action - I get the error message, Object Reference Not Set to an Instance of an Object
Thanks,
Dan
// XMLRequest test data
data1[0].Action = "UPDATE/CLOSE";
data1[1].Action = "CREATE";
Right when the code gets to data1[0].Action - I get the error message, Object Reference Not Set to an Instance of an Object
Thanks,
Dan
ASKER
Thanks. Okay, then what is the correct way to insert UPDATE/CREATE and CLOSE into the data1 array? Can you give me a code example?
Thanks,
Dan
Thanks,
Dan
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Worked. Very interesting solution.
OK, you declare an array of CaseLoadData objects. By the way, the array has just 1 element!
You do not populate it. Of course, calling data1[0].Action will cause a problem because data1[0] is null. I.e., the array element does NOT contain an object.
The next call, data1[1] , will cause System.IndexOutOfRangeExce