2 Part: Oracle SELECT procedure and JAVA Call
Posted on 2006-06-05
500 PTS - 2 Part Question
Part 1: Procedure in Oracle
I have a table called "USERS" in an Oracle 9i database. I need to create a procedure to get data from that table on a column titled "ZIPCODE". Here is what I have so far, please correct and complete for me so that this will work for a JSP app.
PROCEDURE "USERS_GETBYZIPCODE" (
p_ZIPCODE IN VARCHAR2,
p_RESULTS OUT USERS%ROWTYPE
CURSOR USERSBYZIP IS SELECT * FROM USERS WHERE ZIPCODE = p_ZIPCODE;
-- Complete my procedure!
Part 2: Calling Oracle Procedure from JAVA
Now that you have completed my procedure in Step 1, show me how I can call the procedure and get a RecordSet object for use in my JSP application. I am using the java.sql package in a 1.4.2_11 JSP web application.
Thanks in advance for your assistance.