T
tshad
I have a structure (which happens to be a Java DataBean that contains some
string arrays) that is giving me an error.
The error at the "for" statement is:
Object reference not set to an instance of an object.
Here is the code where chDataBean is the structure.
chDataBean.voucherNumber is a string array of voucher numbers. But if there
are no numbers the debugger shows it as <undefined value>. But other fields
are showing as null in the debugger. What is the difference? How would I
test for each one? I assume I would have to do a test before the "for"
statement, since that is where I am getting the error.
***************************************************************
chDataBean = checkHistoryService.readCheckHistory(
elDataBean.employeeIds[ktr],
ruDataBean.employerList[1][0],
"2006",
Session.SessionID);
for(ktr1=0;ktr1<= chDataBean.voucherNumber.GetUpperBound(0);ktr1++)
{
GetPayStatementData(ref sCheckLine,objStreamWriter,
elDataBean.employeeIds[ktr],chDataBean.voucherNumber[ktr1],chDataBean.payDate[ktr1],
ruDataBean.employerList[1][0],eDataBean);
}
************************************************************************
Thanks,
Tom
string arrays) that is giving me an error.
The error at the "for" statement is:
Object reference not set to an instance of an object.
Here is the code where chDataBean is the structure.
chDataBean.voucherNumber is a string array of voucher numbers. But if there
are no numbers the debugger shows it as <undefined value>. But other fields
are showing as null in the debugger. What is the difference? How would I
test for each one? I assume I would have to do a test before the "for"
statement, since that is where I am getting the error.
***************************************************************
chDataBean = checkHistoryService.readCheckHistory(
elDataBean.employeeIds[ktr],
ruDataBean.employerList[1][0],
"2006",
Session.SessionID);
for(ktr1=0;ktr1<= chDataBean.voucherNumber.GetUpperBound(0);ktr1++)
{
GetPayStatementData(ref sCheckLine,objStreamWriter,
elDataBean.employeeIds[ktr],chDataBean.voucherNumber[ktr1],chDataBean.payDate[ktr1],
ruDataBean.employerList[1][0],eDataBean);
}
************************************************************************
Thanks,
Tom