Figure 7.43 shows a stored procedure, UpdateStudent. Develop and build a new project, OracleUpdateStudent, and add code
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 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:
Step by Step Answer:
Oracle Database Programming With Java Ideas Designs And Implementations
ISBN: 9781032302294
1st Edition
Authors: Ying Bai