Thought inc.

The Dynamic O/R Mapping Company
     

CocoBase Technical Support Forums
For access to developer site with software download and doc's, please request CocoBase download and password
will be emailed to you. Response to posts will appear when answered by THOUGHT Support team.
NOTE:You must register separately with forum in order to post your questions, please click on register icon below.
Home   Frequently Asked Questions   Search   Edit your profile   Registration is free!  
Email This Page to Someone!
Show a Printable Version
CocoBase Enterprise O/R Forums > CocoBase Questions
CocoBase 4.5 - Oracle 10g - Calling Stored Procedure with output Parameters
< Previous Thread  
Author
Thread    Post New Thread     Post A Reply
OscarLeon
Member

Registered: Mar 2008
Posts: 1

Hi,
we are trying to implement a new stored Procedure call for Oracle 10g, websphere 6.

The procedure has two input parameters and 5 output ones.
We have not any issue informing the input parameters, but the call is not retrieving us the ouptut parameters informed.
Any ideas about what is happening or any exmaple for calling a Store Procedure with output parameters will be welcome.

This is the cocobase log for this:

CocoPowder:: OP=<call> Return value instance=null
CocoPowder:: OP=<call> NOT SETTING RETURN VALUE!
CocoPowder:: OP=<call> Processing result set
CocoPowder:: OP=<call> Null result set
CocoPowder:: OP=<call> No OUTPUT parameters at all!
CocoPowder:: Began new command for operation=close_stmt
CocoPowder:: OP=<close_stmt> Closing JDBC Statement = com.ibm.ejs.cm.proxy.OracleCallableStatementProxy@179241 [OPEN]
Ended new command for operation=call


And these are the cocobase entries:

<CBObject MapName="com.db.espear.dal.lcm.CGetTradeOriginId" ClassName="com.db.espear.dal.lcm.CGetTradeOriginId" DefaultBlockSize="100" Version="1" AppVersion="3.0.2" DateModified="2003-06-26 10:38:07.572"> <select>
<CBFields />
<CBTables />
<CBClauses />
</select>
<insert>
<CBFields />
<CBTables />
<CBClauses />
</insert>
<update>
<CBFields />
<CBTables />
<CBClauses />
</update>
<delete>
<CBFields />
<CBTables />
<CBClauses />
</delete>
<call>
<CBFieldReturns>
</CBFieldReturns>
<CBProcedures>
<CBTable catalogname="null" schemaname="TRM_REPOSITORY" tablename="TRM_API_P_GET_TRADE_ORIGIN_ID" tabletype="null"></CBTable>
</CBProcedures>
<CBFieldParams>
<CBField location="0" catalogname="null" schemaname="" tablename="TRM_API_P_GET_TRADE_ORIGIN_ID" fieldname="P_ESPEAR_TRADE_NO_IN" fieldvalue=":P_ESPEAR_TRADE_NO_IN" dbfieldtype="CHAR" fielddirection="0" dbtype="12" dbfieldsize="12" searchable="0" signed="0" keyposition="-1"></CBField>
<CBField location="1" catalogname="null" schemaname="" tablename="TRM_API_P_GET_TRADE_ORIGIN_ID" fieldname="P_DATA_SRC_IN" fieldvalue=":P_DATA_SRC_IN" dbfieldtype="VARCHAR2" fielddirection="0" dbtype="12" dbfieldsize="6" searchable="0" signed="0" keyposition="-1"></CBField>
<CBField location="2" catalogname="null" schemaname="" tablename="TRM_API_P_GET_TRADE_ORIGIN_ID" fieldname="P_TRADE_ORIGIN_ID_OUT" fieldvalue=":P_TRADE_ORIGIN_ID_OUT" dbfieldtype="VARCHAR2" fielddirection="0" dbtype="12" dbfieldsize="3" searchable="0" signed="0" keyposition="-1"></CBField>
<CBField location="3" catalogname="null" schemaname="" tablename="TRM_API_P_GET_TRADE_ORIGIN_ID" fieldname="P_DATA_SRC_OUT" fieldvalue=":P_DATA_SRC_OUT" dbfieldtype="VARCHAR2" fielddirection="0" dbtype="12" dbfieldsize="6" searchable="0" signed="0" keyposition="-1"></CBField>
<CBField location="4" catalogname="null" schemaname="" tablename="TRM_API_P_GET_TRADE_ORIGIN_ID" fieldname="P_SRC_TABLE_OUT" fieldvalue=":P_SRC_TABLE_OUT" dbfieldtype="VARCHAR2" fielddirection="0" dbtype="12" dbfieldsize="10" searchable="0" signed="0" keyposition="-1"></CBField>
<CBField location="5" catalogname="null" schemaname="" tablename="TRM_API_P_GET_TRADE_ORIGIN_ID" fieldname="P_ERROR_STATUS_OUT" fieldvalue=":P_ERROR_STATUS_OUT" dbfieldtype="CHAR" fielddirection="0" dbtype="12" dbfieldsize="1" searchable="0" signed="0" keyposition="-1"></CBField>
<CBField location="6" catalogname="null" schemaname="" tablename="TRM_API_P_GET_TRADE_ORIGIN_ID" fieldname="P_ERROR_MSG_OUT" fieldvalue=":P_ERROR_MSG_OUT" dbfieldtype="VARCHAR2" fielddirection="0" dbtype="12" dbfieldsize="255" searchable="0" signed="0" keyposition="-1"></CBField>
</CBFieldParams>
</call>
</CBObject>

The paremters definition in the Stored Procedure are these ones:

P_ESPEAR_TRADE_NO_IN IN CHAR,
P_DATA_SRC_IN IN VARCHAR2,
P_TRADE_ORIGIN_ID_OUT OUT NOCOPY VARCHAR2,
P_DATA_SRC_OUT OUT NOCOPY VARCHAR2,
P_SRC_TABLE_OUT OUT NOCOPY VARCHAR2,
P_ERROR_STATUS_OUT OUT NOCOPY CHAR,
P_ERROR_MSG_OUT OUT NOCOPY VARCHAR2


Thanks in advance

03-07-2008 04:33 AM
Click Here to See the Profile for OscarLeon    Find more posts by OscarLeon        Edit/Delete Message    Reply w/Quote    IP: Logged
admin
Administrator

Registered: Apr 2001
Posts: 19

Hi,

From your xml, it looks like you are on CocoBase 4.x or earlier. Open CocoAdmin, File - Edit Map and edit the "call" operation on your map. Select the "Parameters" node to see a table listing of your parameters. Make sure you OUT parameters appear defined as such. Due to old jdbc drivers not providing correct procedure metatada, OUT parameters might not have been recognized properly when the procedure was imported.

THOUGHT Support

03-07-2008 10:43 AM
Click Here to See the Profile for admin    Find more posts by admin        Edit/Delete Message    Reply w/Quote    IP: Logged
All times are PST (US)    Post New Thread     Post A Reply
Forum Jump:
< Previous Thread  

Forum Rules:
Who Can Read The Forum? Any registered user or guest.
Who Can Post New Topics? Any registered user.
Who Can Post Replies? Any registered user.
Changes: Messages can be edited by their author. Messages can be deleted by their author.
Posts: HTML code is OFF. Smilies are OFF. vB code is OFF. [IMG] code is OFF.

Admin Options:
Open / Close Thread
Move Thread
Delete Thread
Edit Thread

< Contact Us - THOUGHT Inc. >

Copyright © Jelsoft Enterprises Limited 2000.
Copyright 2001 All Rights Reserved, THOUGHT Inc.