on 05-24-2007 5:43 AM
Hi All,
I use Entity Bean's createMethod in a Session Bean BusinessMethod.
If only create one EB (count=1), it can run.
but i want to create multi-EBs(count>1),it can not run.
Education_JB[] arg1;
for (int i = 0; i <count ; i++) {
String EID = generateId();
String arg2 = arg1<i>.getEmployeeID();
String arg3 = arg1<i>.getEducationLevel();
String arg4 = arg1<i>.getSchoolAttended();
String arg5 = arg1<i>.getLocation();
String arg6 = arg1<i>.getMajorField();
String arg9 = arg1<i>.getGraduated();
educationhome.create(EID, arg2, arg3, arg4, arg5, arg6, datearg7, datearg8, arg9);
}
please help me.
Well, not entirely sure what you're trying to do, but for starters you're not referencing the position in the array properly:
Education_JB[] arg1;
for (int i = 0; i < arg1.length ; i++) {
String EID = generateId();
String arg2 = arg1<i>.getEmployeeID();
String arg3 = arg1<i>.getEducationLevel();
String arg4 = arg1<i>.getSchoolAttended();
String arg5 = arg1<i>.getLocation();
String arg6 = arg1<i>.getMajorField();
String arg9 = arg1<i>.getGraduated();
educationhome.create(EID, arg2, arg3, arg4, arg5, arg6, datearg7, datearg8, arg9);
}
Try that and see if it helps.
Cheers,
Dion
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
To be able to help you, you need to provide us with a lot more information. Simply writing that the create methid returns an error is nowhere near enough information for us make an educated guess where the problem might be.
If you are unsure please read through the rules of engagement for this forum.
Dion
User | Count |
---|---|
86 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.