|
Hi, I am trying to update the database using stored procedure in SQLRPG, here is my code in RPG * File fields data structure D DS_PL1136 E DS EXTNAME(PL1136) INZ C/EXEC SQL C+ INSERT INTO PL1136 C+ VALUES (:DS_PL1136) C/END-EXEC I insert all the required values in data structure , and here is my code in java CallableStatement cstmtSPPL0038 = connection.prepareCall("{call SPPL0038(?,?,?,?,?)}"); cstmtSPPL0038.setString(1, paramA); cstmtSPPL0038.setString(2, paramB); cstmtSPPL0038.setString(3, paramC); cstmtSPPL0038.registerOutParameter(4, Types.CHAR); cstmtSPPL0038.registerOutParameter(5, Types.CHAR); boolean b = cstmtSPPL0038.execute(); // i also tried executeUpdate(); but did not worked // boolean is always false System.out.println("boolean " + b); The Stored procedure works fine, if called from RPG program and also i tried to insert using prepared statement from java and it worked fine, what may be the problem Ashish __________________________________________________ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.