This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes Stored procedures using JWorks Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Stored procedures using JWorks" Watch "Stored procedures using JWorks" New topic

Stored procedures using JWorks

Ian Reddy

Joined: Mar 23, 2006
Posts: 2
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");
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);
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

if ( sqlMgr != null )

releaseConnection( db );
thanks in advance
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63873

"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.

JavaRanch Sheriff

[Asking smart questions] [About Bear] [Books by Bear]
Ian Reddy

Joined: Mar 23, 2006
Posts: 2
Maximilian Xavier Stocker
Ranch Hand

Joined: Sep 20, 2005
Posts: 381

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.
I agree. Here's the link:
subject: Stored procedures using JWorks
jQuery in Action, 3rd edition