on 08-26-2008 4:44 PM
I have 2 ms-sql update statement through stored procedures
1) as a batch update
if (vendorBillDetailsDTO != null) {
stmnt =
con.prepareCall(
"Exec usp_CMP_UpdPRDetails ?, ?, ?, ?");
Iterator it = vendorBillDetailsDTO.iterator();
while (it.hasNext()) {
VendorBillDetailsDTO myVendorBillBillDetailsDTO =
(VendorBillDetailsDTO) it.next();
stmnt.setInt(
1,
myVendorBillBillDetailsDTO.getBillDetailRef().intValue());
stmnt.setInt(
2,
myVendorBillBillDetailsDTO.getBillId().intValue());
stmnt.setString(3, myVendorBillBillDetailsDTO.getCRN());
stmnt.setInt(
4,
myVendorBillBillDetailsDTO.getServiceCode().intValue());
stmnt.setString(5, myVendorBillBillDetailsDTO.getPRShortText());
stmnt.addBatch();
//it.next();
} //while
stmnt.executeBatch();
} //if
This block is working perfectly fine and statement is correctly getting executed
2) if (vendorBillHeaderDTO != null) {
stmnt = con.prepareCall(
"Exec usp_CMP_UpdPRHeader ?,?,?");
stmnt.setInt(1, vendorBillHeaderDTO.getBillId().intValue());
stmnt.setString(2, vendorBillHeaderDTO.getBillType());
stmnt.setString(3, vendorBillHeaderDTO.getEstimateReference());
stmnt.executeUpdate();
}//end if
This statement is not getting executed (I have many input parameters like int , timestamp , long , double etc). It is not throwing any error (Even when I enclosed it with try catch theere is no exception thrown .) However in back end record is not getting updated .
Any ideas ?
Please help
NPB
Well, that could be a problem in the Data Base side, i suggest you:
1) See the log file of your DB,
2) Run in your DB the Store Procedure, maybe you forget put a commit, and see that of this way you can update the table you can.
Try it.
Regards if helps you
Josué Cruz
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
minor typing mistake . When I cought the exception in webdynpro and ejb , I could resolve it
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.