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 » Extracting data from multiple tables uisng SP in JDBCAdapter

Post new topic  Reply to topic
 Extracting data from multiple tables uisng SP in JDBCAdapter « View previous topic :: View next topic » 
Author Message
siva.kasetty
PostPosted: Tue Apr 08, 2008 4:26 am    Post subject: Extracting data from multiple tables uisng SP in JDBCAdapter Reply with quote

Apprentice

Joined: 17 Mar 2008
Posts: 45

hi ,
i am trying to Extracting data from multiple tables using an Stored Procedure and creating Business object of the Stored Procedure in JDBC Adapter.

i am created the Stored procedure and also created the Business object using Stored Procedure.
but the connector is not able to pick up the object created.
it is giving error like



[Time: 2007/04/08 08:12:19.047] [System: ConnectorAgent] [SS: JDBCConnector] [Th
read: appPolling (#1246245057)] [Type: Error] [MsgID: 20026] [Mesg: Unsubscribed event from application: Object Name:TEST, Verb: Retrieve.]



for your reference my procedure is:

CREATE OR REPLACE Procedure Test1 (v_empno IN employee.ID%type)
IS
v_ename employee.name%type ;
v_dname dept1.deptname%type ;
CURSOR c1 IS
select e.name, d.deptname from employee e, dept1 d
where e.ID= v_empno and d.deptid = v_dname;
BEGIN
open c1 ;
LOOP
fetch c1 into v_ename, v_dname ;
exit when c1%notfound ;
end loop ;
close c1 ;
end ;

Trigger is:

create or replace trigger keshav
before insert or update on EMPLOYEE
INSERT INTO xworlds_events
VALUES (1797,'JDBCConnector','1797','TEST','Retrieve',1,sysdate,0,'Comments');


Is it possible to pass an aurgument to the store procedure....
if yes how should i pass the value to it when i am creating Business Object of the procedure..........


Please advise
Back to top
View user's profile Send private message
Gaya3
PostPosted: Tue Apr 08, 2008 4:59 am    Post subject: Re: Extracting data from multiple tables uisng SP in JDBCAda Reply with quote

Jedi

Joined: 12 Sep 2006
Posts: 2493
Location: Boston, US

siva.kasetty wrote:

i am trying to Extracting data from multiple tables using an Stored Procedure and creating Business object of the Stored Procedure in JDBC Adapter.

I dont get you what does this mean, Created a BO of the Stored procedure.


BO can be created for tables or schemas......

Regards
Gayathri
_________________
Regards
Gayathri
-----------------------------------------------
Do Something Before you Die
Back to top
View user's profile Send private message
siva.kasetty
PostPosted: Tue Apr 08, 2008 5:20 am    Post subject: Reply with quote

Apprentice

Joined: 17 Mar 2008
Posts: 45

i am creating the BO for table
Back to top
View user's profile Send private message
Gaya3
PostPosted: Tue Apr 08, 2008 5:26 am    Post subject: Reply with quote

Jedi

Joined: 12 Sep 2006
Posts: 2493
Location: Boston, US

You can create only One BO for a Table,

There is no way to colaborate the BO.

you can pass, Variables to the Stored procedure

Regards
Gayathri
_________________
Regards
Gayathri
-----------------------------------------------
Do Something Before you Die
Back to top
View user's profile Send private message
siva.kasetty
PostPosted: Tue Apr 08, 2008 5:47 am    Post subject: Reply with quote

Apprentice

Joined: 17 Mar 2008
Posts: 45

thanks for replay,

shall i know how to pass the value.
Back to top
View user's profile Send private message
Gaya3
PostPosted: Tue Apr 08, 2008 8:10 pm    Post subject: Reply with quote

Jedi

Joined: 12 Sep 2006
Posts: 2493
Location: Boston, US

Here you can do

1. Create a View of the tables you required.
2. Create a BO of the View
3. In the excuteStoredprocedure use Vector storedProcParameters to pass the values from Adapter.

Regards
Gayathri
_________________
Regards
Gayathri
-----------------------------------------------
Do Something Before you Die
Back to top
View user's profile Send private message
Gaya3
PostPosted: Tue Apr 08, 2008 8:15 pm    Post subject: Reply with quote

Jedi

Joined: 12 Sep 2006
Posts: 2493
Location: Boston, US

These are the two ways for calling stored procedure.

call <spName>(?,?,?)
call <spName>

Syntax

SPN=StoredProcedureName;RS=true|false[;IP=Attribute_Name1[:Attribute_Name2[:...]]]
[;OP=Attribute_Name1| RS[:Attribute_Name2| RS[:...]]]
[;IO=Attribute_Name1[:Attribute_Name2[:...]]]



Regards
Gayathri
_________________
Regards
Gayathri
-----------------------------------------------
Do Something Before you Die
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 » Extracting data from multiple tables uisng SP in JDBCAdapter
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.