aspose file tools*
The moose likes Spring and the fly likes how to handle dynamic tables in spring?  Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "how to handle dynamic tables in spring?  " Watch "how to handle dynamic tables in spring?  " New topic
Forums: Oracle/OAS Spring
Author

how to handle dynamic tables in spring?

surya murali
Greenhorn

Joined: Mar 13, 2013
Posts: 1
Hi,

I'm calling one storeproc that SP return type is defined as " o_statbl OUT qry_ssu_pkg.RTBL".
in package mentioned like "TYPE RTBL IS TABLE OF T1 INDEX BY BINARY_INTEGER;

TYPE T1 IS RECORD of some columns.


In my code i declared parameter like

declareParameter(new SqlOutParameter(o_statbl, OracleTypes.STRUCT,"qry_ssu_pkg.RTBL",new TableHandler()));

final class TableHandler implements SqlReturnType
{

public Object getTypeValue(CallableStatement cs, int row, int arg2,
String arg3) throws SQLException {


}

getting exception :
nested exception is java.sql.SQLException: invalid name pattern: qry_ssu_pkg.RTBL

I tryed by given OracleTypes.ARRY ,OracleTypes.PLSQL_INDEX_TABLE getting same exception .

Could you please help me how to process this type of OUT parameters in spring?
Bill Gorder
Bartender

Joined: Mar 07, 2010
Posts: 1632
    
    7

Does this shed any light?
http://forum.springsource.org/showthread.php?33053-How-can-i-pass-arraylist-to-stored-procedure

Also some stuff in the reference manual

http://static.springsource.org/spring/docs/3.2.2.RELEASE/spring-framework-reference/htmlsingle/#jdbc-simple-jdbc-call-1
http://static.springsource.org/spring/docs/3.2.2.RELEASE/spring-framework-reference/htmlsingle/#jdbc-simple-jdbc-call-3
http://static.springsource.org/spring/docs/3.2.2.RELEASE/spring-framework-reference/htmlsingle/#jdbc-StoredProcedure
http://static.springsource.org/spring/docs/3.2.2.RELEASE/spring-framework-reference/htmlsingle/#jdbc-complex-types

Also you can have a look at this project for additional Oracle support
http://www.springsource.org/spring-data/jdbc-extensions

I am adding this to the Oracle forum for you in case someone there might be able to help you.


[How To Ask Questions][Read before you PM me]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: how to handle dynamic tables in spring?
 
Similar Threads
Regarding Threads
Bad code - Help me fix it
join()??
Arrays- Initialising arrays
static members are un-serializable??