Author |
Message
|
siva.kasetty |
Posted: Tue Apr 08, 2008 4:26 am Post subject: Extracting data from multiple tables uisng SP in JDBCAdapter |
|
|
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 |
|
 |
Gaya3 |
Posted: Tue Apr 08, 2008 4:59 am Post subject: Re: Extracting data from multiple tables uisng SP in JDBCAda |
|
|
 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 |
|
 |
siva.kasetty |
Posted: Tue Apr 08, 2008 5:20 am Post subject: |
|
|
Apprentice
Joined: 17 Mar 2008 Posts: 45
|
i am creating the BO for table |
|
Back to top |
|
 |
Gaya3 |
Posted: Tue Apr 08, 2008 5:26 am Post subject: |
|
|
 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 |
|
 |
siva.kasetty |
Posted: Tue Apr 08, 2008 5:47 am Post subject: |
|
|
Apprentice
Joined: 17 Mar 2008 Posts: 45
|
thanks for replay,
shall i know how to pass the value. |
|
Back to top |
|
 |
Gaya3 |
Posted: Tue Apr 08, 2008 8:10 pm Post subject: |
|
|
 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 |
|
 |
Gaya3 |
Posted: Tue Apr 08, 2008 8:15 pm Post subject: |
|
|
 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 |
|
 |
|