Question: Figure 7.43 shows a stored procedure, UpdateStudent. Develop and build a new project, OracleUpdateStudent, and add code into the Update button event handler on the
Figure 7.43 shows a stored procedure, UpdateStudent. Develop and build a new project, OracleUpdateStudent, and add code into the Update button event handler on the StudentFrame form class to call this stored procedure to update a student record for the Student Table in our sample Oracle database using the CallableStatement method. A default student photo, Default.jpg, can be used for this update action. The updated student record is:
•Student ID: B92996 •Student Name: Black Jackson •GPA: 3.12 •Credits: 42 •Major: Computer Science •SchoolYear: Sophomore •Email: bjackson@college.edu •simage: Default.jpg

Part 1:
Copy and modify a project, OracleSelectStudent, which can be found inthe folder Class DB Projects\Chapter 6 in the Students folder on the CRC Press ftp site (refer to Figure 1.2 in Chapter 1). Based on that project and referring to two other projects, OracleUpdateFaculty and OracleCallableUpdate, which can be found in the folder Class DB Projects\Chapter 7 in the Students folder on the CRC Press ftp site, build your new project, OracleUpdateStudent.
Part 2:
Add one if block in the Update button event handler to identify the Java Callable Method, and build and add your code inside this block.
Part 3:
Refer to the code in the Update button event handler in the FacultyFrame Form in the project OracleCallableUpdate located in the folder Class DB Projects\Chapter 7 in the Students folder on the CRC Press ftp site (refer to Figure 1.2 in Chapter 1). You may also need to use two user-defined methods, getFacultyImage() and CurrentFaculty(), developed in that project and change them to getStudentImage() and CurrentStudent().
Figure 1.2:


create or replace NONEDITIONABLE PROCEDURE UPDATESTUDENT ( SID IN VARCHAR2 , SNAME IN VARCHAR2 SGPA IN NUMBER SCREDITS IN NUMBER SMAJOR IN VARCHAR2 , SSCHOOLYEAR IN VARCHAR2 SEMAIL IN VARCHAR2 SSIMAGE IN BLOB ) AS BEGIN UPDATE Student SET student_name=SNAME, gpa=SGPA, credits-SCREDITS, major=SMAJOR, school Year SSCHOOLYEAR, email=SEMAIL, simage=SSIMAGE WHERE student_id=SID; END UPDATESTUDENT;
Step by Step Solution
3.41 Rating (160 Votes )
There are 3 Steps involved in it
To address the task youve given me I will guide you through the process of creating a Java project that uses JDBC to call an Oracle stored procedure to update a student record Please note that I dont ... View full answer
Get step-by-step solutions from verified subject matter experts
