?
Solved

ORACLE STORED PROCEDURE CALLING PROBLEM IN JSP?

Posted on 2004-03-27
7
Medium Priority
?
284 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 300 total points
ID: 10698003
0
Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month10 days, 12 hours left to enroll

764 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