ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Interchange Server + Adapters » How to pass record set into stored procedure through adapter

Post new topic  Reply to topic
 How to pass record set into stored procedure through adapter « View previous topic :: View next topic » 
Author Message
integrator
PostPosted: Wed Mar 21, 2007 7:14 am    Post subject: How to pass record set into stored procedure through adapter Reply with quote

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
View user's profile Send private message
mqseries0209
PostPosted: Wed Mar 21, 2007 9:48 am    Post subject: Reply with quote

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
View user's profile Send private message
integrator
PostPosted: Wed Mar 21, 2007 11:03 pm    Post subject: Definition of SP Reply with quote

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
View user's profile Send private message
mqseries0209
PostPosted: Thu Mar 22, 2007 6:43 am    Post subject: Reply with quote

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
View user's profile Send private message
integrator
PostPosted: Tue Mar 27, 2007 11:36 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Interchange Server + Adapters » How to pass record set into stored procedure through adapter
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.