Below is an extract from one of my pages:
javax.naming.Context ctx = new javax.naming.InitialContext();
// find the data source deployed in the application server
javax.sql.DataSource ds = (javax.sql.DataSource)ctx.lookup("jdbc/gropte01");
java.sql.Connection c = ds.getConnection();
// Use ? to represent a parameter (either input or output) in the stored procedure
java.sql.CallableStatement cstmt = c.prepareCall("{call SP_SET_ORDER_STATUS(?,?,?,?,?,?)}");
// set the first parameter (customer ID)
cstmt.setString(1, "CANC");
cstmt.setBigDecimal(2, getSessionBean1().getWorkOrderNumber());
cstmt.setString(3, "JSC");
cstmt.setString(4, "");
cstmt.registerOutParameter(5, java.sql.Types.VARCHAR);
cstmt.registerOutParameter(6, java.sql.Types.VARCHAR);
cstmt.execute();
c.commit();
Although this is from the first version of Creator, I guess it should work with Creator 2.
Slava