Solved

ORACLE STORED PROCEDURE CALLING PROBLEM IN JSP?

Posted on 2004-03-27
7
278 Views
Last Modified: 2010-03-31
I wrote a stored procedure in oracle 9i  I don’t know its right or wrong  but its compiling error free ..  I want pass TID for example 189  it should return record set it could be 1 record or more then 1..
well This is my PROCEDURE:


-----------------XXX----------------XXX-------------------------XXX------------------
CREATE OR REPLACE PROCEDURE GETMSGRECSET
(TH_ID   IN ESSE.TID%TYPE)
        
        
IS
         cursor ET_cursor IS
      select EM.MSGID,EMT.PID,EM.SUT,EM.CDATE
                     FROM ESSE EM, ESST EMT
                     WHERE
                     EM.TID=TH_ID AND
                     EMT.CID=EM.MSGID AND
                     EMT.APPROVED=1 ;
begin
      
      COMMIT;
      
      
end GETMSGRECSET;
/

-----------------XXX----------------XXX-------------------------XXX------------------

I need 2 no how I can get all filed  in jsp ?
and is there any thing wrong in my s-procedure so let me know ..??
0
Comment
Question by:onlyamir007
  • 4
  • 3
7 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 10695675

You need to return the cursor from the SP. Why is there a commit in a select?

>>I need 2 no how I can get all filed  in jsp ?

Probably just cast the single row in the ResultSet returned from the SP  (the cursor) to a ResultSet (your n rows)
0
 
LVL 4

Author Comment

by:onlyamir007
ID: 10697267
Can you give me example ??
b/caz, I’m new I mean I’m writing SP first time :$
0
 
LVL 86

Accepted Solution

by:
CEHJ earned 100 total points
ID: 10698003
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 4

Author Comment

by:onlyamir007
ID: 10698384
thx 4 your help
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 10698422
8-)
0
 
LVL 4

Author Comment

by:onlyamir007
ID: 10702039
HI  CEHJ
I need little more help :$
-----------------------------xxxxxxxxxxxxxxxxxxxxxxxx-------------------------xxxxxxxxxxxxxxxxxxxxxx------------------
CREATE OR REPLACE FUNCTION sp_get_M
(
FM_ID          IN             NUMBER,
TUSER        OUT             EM.USERID%TYPE,
TRPS         OUT            EM.MID%TYPE
)
    RETURN types.ref_MGcursor
AS
    F_cursor types.ref_MGcursor;
BEGIN
    OPEN F_cursor FOR

                                SELECT EM.USERID
            FROM EF, ET, EM , EUR
            WHERE
            EF.FID        =    FM_ID ;


            SELECT COUNT(USERID) AS TUSER
            INTO TUSER
            FROM EM
            WHERE
            EM.USERID   =   <<<<<<<  I WANT USE HERE  FIRST QUERY USERID OUTPUT ???????? >>>>>        
            
    RETURN F_cursor;
END;
/
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 10703270
This is not really the TA for these questions onlyamir007. Please post in the database TA.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
groovy example issue 10 90
AWS and Java and Rest - newbie question (Is this an authentication issue) 4 68
recursion example 16 111
use lov values 2 36
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
The viewer will learn how to implement Singleton Design Pattern in Java.

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now