GTU WTAD Practical 30 : Java MySQL Connectivity Example

GTU WTAD Practical 30 : Write a Java application to invoke a stored procedure using a CallableStatement. For this a stored procedure called incrementSalary may be developed to increase all the employees salary by a percentage specified in the parameter.

GTU WTAD Practical 30

Database : Mysql

Database username : root

Database Password : <blank>

Database Name: mydabase

Table : employee

Column : emp_id,emp_name_emp_salary

My SQL Procedure :

 

To call SQL Procedure (10 % Salary Increment passed as parameter):

 

File Name : index.jsp

File Location : Tomcat_Apache\webapps\gtu30\

 

File Name : CallStoredProcedure.java

File Location : Tomcat_Apache\webapps\gtu30\WEB-INF\classes

 

File Name : web.xml

File Location : Tomcat_Apache\webapps\gtu30\WEB-INF\

 

Output

GTU WTAD Practical 30

Adarsh Patel

My Self Adarsh Suryakant Patel. Currently I am working as Assistant Professor at Parul Instiute of Engineering and Technology, MCA Department, Limda, Vadodara. Major Responsibility : * Lectures * Organizing Training and Expert Sessions for * Placement and Recruitment * Faculty Representative