Recent Pos

Working With JDBC CallableStatement IN and OUT Parameters

Facebooktwittergoogle_plusredditpinterestlinkedintumblrmail

jdbc callablestatement in out parameters
Example# 1: We want to execute following procedure:

 
CallableStatementEx2.java

 
 
Example# 2: Procedure call to change the location of the given deptno and getback the old location to read:

We want to execute the following procedure –

 

CallableStatementEx3.java

 
 
Example# 3: Rewriting the above procedure to use “IN OUT” parameter:

 
Note: When accessing this procedure to execute from the Java application (JDBC) we shall consider the second parameter as an IN parameter while setting the parameter value, and OUT parameter while registering the parameter type.
 

CallableStatementEx4.java

 
 
<-Previous: The JDBC CallableStatement Object | | Next->Working With JDBC CallableStatement Database Function

No Comments

Post a Comment