stored procedure

how to call sps in studio creator with parameters?I doexec spConsAutorObra ?, ?, ?, ? [sunm][SQLServer JDBC Driver] The requested parameter metadata is not avaliable for the current statement
[219 byte] By [Elton] at [2007-11-26 11:00:57]
# 1
we don't support drag and drop way of consuming stored procedure.check out these: http://media.datadirect.com/download/docs/jdbc/jdbcref/jdbcdesign.html#wp72446 http://blogs.sun.com/jfbrown/date/20051116HTH,Sakthi
sakthivelgopal at 2007-7-7 3:14:38 > top of Java-index,Development Tools,Java Tools...
# 2
and, to show results? or to bind with a table?
Elton at 2007-7-7 3:14:38 > top of Java-index,Development Tools,Java Tools...
# 3

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

Slava17 at 2007-7-7 3:14:38 > top of Java-index,Development Tools,Java Tools...