Answer Posted / rama krishna dwadasi
By using CallableStatement we can call a stored Procedure
from JDBC
CallableStatement:- is an interface available in java.sql
package and is extending PreparedStatement interface.
•It is used to execute stored procedures available in the
database.
•Following is the way to create the CallableStatement object.
a)CallableStatement cs = con.prepareCall(sql);
b)CallableStatement cs = con.prepareCall(sql,int,int);
•One CallableStatement object can be used to invoke one
stored procedure only.
•CallableStatement also provides placeholder mechanism
•Following is the way to invoke the stored procedure.
CallableStatement cs = con.prepareCall(“{call p1 (?,?)}”);
| Is This Answer Correct ? | 3 Yes | 2 No |
Post New Answer View All Answers
when a request is generated from apache tomcat 5.5 and goes to oracle 10g or mysql,,, how the oracle or mysql reads the request as apache is a web server and oracle 10g is application server? when the oracle 10g provides response, how the apche tomcat reads it???
What is boolean logic?
How can I debug the Java security exceptions and AccessControlExceptions?
Where we write javascript code in html page?
What are different types of control structures?
What are namespaces in java?
Name some OOPS Concepts in Java?
What restrictions are placed on method overloading in java programming?
When a thread is executing synchronized methods , then is it possible to execute other synchronized methods simultaneously by other threads?
What is the difference between iterator and enumeration ?
List the interfaces which extends collection interface?
What is gui programming?
Can a constructor call the constructor of parent class?
What is the purpose class.forname method?
How do you identify if jvm is 32-bit or 64-bit from java program?