cancel
Showing results for 
Search instead for 
Did you mean: 

stored procedure call not working

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Answers (1)

Answers (1)

Former Member
0 Kudos

minor typing mistake . When I cought the exception in webdynpro and ejb , I could resolve it