• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Stored procedures using JWorks

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Need Help, using Stored procedures using JWorks. I am having problems returning values from the stored procedure (single return values, I Could get result sets though).

public Map runStoredProcedure( String callString, Map parameters, String a) throws Exception
{
ItcDatabase db = null;
ItcSqlMgr sqlMgr = null;
ItcDataObject dobjRecord;
Map recordSetMap = new HashMap();

System.out.println("New Function");
try
{
db = getConnection();
sqlMgr = new ItcSqlMgr( db );


// put the list of parameters in an ItcDataObject for processing by the sql mgr.
ItcDataObject dobjParams = null;
if( parameters != null && parameters.size() > 0 )
{
dobjParams = new ItcDataObject();

for( Iterator it=parameters.keySet().iterator(); it.hasNext(); )
{
String paramName = (String) it.next();
dobjParams.put( paramName, parameters.get( paramName ) );
}
}

sqlMgr.exec( "{ ? = call DROP_BATCH_INDEXES_F() }", dobjParams, false );

//I am not sure how to set the return type using Jworks

}
finally
{
if ( sqlMgr != null )
sqlMgr.close();

releaseConnection( db );
}
thanks in advance
 
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"Ian ISR",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
JavaRanch Sheriff
 
Ian Reddy
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
DONE !!
 
Ranch Hand
Posts: 381
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ian,

I think from reading your post that your specific question is

"I am not sure how to set the return type using Jworks"

I would suspect that JWorks would have a tutorial or documentation that would aid with this. I think their site would be a good place to start. I briefly googled JWorks but I am getting a number of hits and I don't really know what it is that you are using so if you need more help then I would suggest that you post a link to the specific site for the tool that you are using.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic