|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
How to pass record set into stored procedure through adapter |
« View previous topic :: View next topic » |
Author |
Message
|
integrator |
Posted: Wed Mar 21, 2007 7:14 am Post subject: How to pass record set into stored procedure through adapter |
|
|
Newbie
Joined: 21 Mar 2007 Posts: 4
|
Hi,
is it possible to pass a Record set into stored procedure as a parameter through WBI adapter from MQ?
If it is then, how is it possible? What are the configurations required for passing record set?
Thank you. |
|
Back to top |
|
 |
mqseries0209 |
Posted: Wed Mar 21, 2007 9:48 am Post subject: |
|
|
 Voyager
Joined: 30 Mar 2006 Posts: 90
|
Can you post the definition of ur SP and/or example of data that u r trying to pass to SP. |
|
Back to top |
|
 |
integrator |
Posted: Wed Mar 21, 2007 11:03 pm Post subject: Definition of SP |
|
|
Newbie
Joined: 21 Mar 2007 Posts: 4
|
The requirement is for simple RecordSet passing.
The procedure may look like the following:
PROCEDURE testSP(
param IN SYS_REFCURSOR ) AS
v_id ERP_TABLE.ID%TYPE;
v_detail ERP_TABLE.DETAIL%TYPE;
BEGIN
IF param%ISOPEN THEN
CLOSE param;
END IF;
OPEN param;
FETCH param
INTO v_id, v_detail;
INSERT INTO ERP_TABLE(ID, DETAIL)
VALUES(v_id, v_detail);
END testSP; |
|
Back to top |
|
 |
mqseries0209 |
Posted: Thu Mar 22, 2007 6:43 am Post subject: |
|
|
 Voyager
Joined: 30 Mar 2006 Posts: 90
|
hey I see that all u r doing is reading two elements from the RS passed and then inserting them to DB.
Instead of SP accepting that in RS, cant you make SP take it as TWO different simple IN parameters (which woukld be Ideal thing to do)?
I did not understand ur design.
What is the corresponding SQL to call a SP taking a RS a IN parameter?
How would you call this SP using a java program?.
I did not find any corresponding info in JDBC doc.
I think its a bad design for a SP to accept a RS as IN parameter.
just what I think.............  |
|
Back to top |
|
 |
integrator |
Posted: Tue Mar 27, 2007 11:36 pm Post subject: |
|
|
Newbie
Joined: 21 Mar 2007 Posts: 4
|
Thank you for your reply.
I gave the procedure as a simple sample procedure. The actual procedure, is much more complex, with a lot of sub-procedure calling and also large in size.
Also the FETCH statement will be within a LOOP for multiple rows.
If anyone can give me a direct clue to invoke this procedure through WBI adapter, it will be helpful for me to change it as per the actual requirement. Please tell me, how to configure the BO, for this kind of procedure. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|