Hi everybody,
I�m trying to call an Oracle procedure (package) from a jsp. I�m using this
code:
try
{
int temp_int = 0;
Connection conn = getOracleConnection();
CallableStatement cstmt = conn.prepareCall("{ call
tepkg_opp_verify.teprc_opp_verify_attribute(?,?,?,?,?,?,?)}");
cstmt.setInt( 1, temp_int );
cstmt.setInt( 2, strProdReleaseId );
cstmt.setInt(3, strQuoteId);
cstmt.registerOutParameter(4, Types.VARCHAR);
cstmt.setInt(5, temp_int);
cstmt.registerOutParameter(6, Types.INTEGER);
cstmt.registerOutParameter(7, Types.INTEGER);
cstmt.executeUpdate();
conn.close();
}
catch (SQLException x)
{
log.addEntry("newAttribVal.jsp", "Error SQLx" + x);
}
catch (Exception x)
{
log.addEntry("newAttribVal.jsp", "Exception " + x );
}
The package I�m trying to call:
Package TEPKG_OPP_VERIFY AS
TYPE v_value_table_type IS table of Atri.swName%Type index by binary_integer
(VARCHAR);
procedure TEPRC_OPP_VERIFY_ATTRIBUTE(
locale IN INT,
gswProdReleaseId IN Prod.swprodreleaseid%TYPE (Number 15,5),
gteQuoteItemId IN Qite.tebquoteitemid%TYPE (Number 15,5),
v_value_table OUT v_value_table_type,
batch_size INT,
out_batch_size IN OUT INT,
status OUT INT);
I didn�t find lots of references to explain how to use the CallableStatement
class. I think the problem is in the definition of the parameter no. 4
(because it is a Table). I don�t know if the registerOutParameter supports
it.
The error I�m getting is : wrong number or types of arguments in call to
'TEPRC_OPP_VERIFY_ATTRIBUTE'
Did you have a similar problem? can I use the CallableStatement to get a set
of results? Is there any other way of doing this?
Any help would be greatly appreciated.
Yacoub
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the mailserver that powers this list at http://www.coolfusion.com
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists