Kbase P117172: SQLException when passing a Temp-Table as input parameter from a Java Open Client using Java OpenAP
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  7/5/2006 |
|
Status: Unverified
FACT(s) (Environment):
OpenEdge 10.1A
SYMPTOM(s):
SQLException when passing a Temp-Table from a Java Open Client
com.progress.open4gl.Open4GLException
using the Java Open Client OpenAPI
The Temp-Table is defined as INPUT PARAMETER TABLE FOR tt in the Progress procedure
Calling the addTableHandle method of the ParamArray Class
CAUSE:
When passing a Temp-Table, the addTable method should be used instead.
The addTableHandle can only be used when passing a Temp-Table handle.
FIX:
In the Java program, call the addTable method of the ParamArray Class instead.
For example:
// Connect to the AppServer
com.progress.open4gl.javaproxy.Connection myConn = new com.progress.open4gl.javaproxy.Connection("","","");
OpenAppObject ao = new OpenAppObject(myConn,"asbroker1");
// Create ParamArray variable for parameters
ParamArray params = new ParamArray(1);
// Temp Table schema (2 fields)
ProResultSetMetaDataImpl proMetaData = new ProResultSetMetaDataImpl(2) ;
proMetaData.setFieldMetaData(1,"field1",0,Parameter.PRO_CHARACTER);
proMetaData.setFieldMetaData(2,"field2",0,Parameter.PRO_INTEGER);
// TTsample extends the com.progress.open4gl.InputResultSet Class
TTsample rs = new TTsample();
// Add Temp-Table to the ParamArray
params.addTable(0, rs,ParamArrayMode.INPUT,proMetaData);
// Run the procedure
ao.runProc("setTT.p",params);
ao._release();