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
Can we sort hashmap in java?
Can we declare an interface as final?
What is the history of java?
What is hash table in java?
What is the difference between quicksort & mergesort? When should they be used? What is their running time?
What is unicode with example?
Is simpledateformat safe to use in the multithreaded program?
What are structs in java?
What is the main use of java?
Explain the difference between an object-oriented programming language and object-based programming language?
Does java set allow duplicates?
What is the purpose of the enableevents() method?
Why java is called not pure object oriented language?
Which object oriented concept is achieved by using overloading and overriding?
How to sort an unsorted array in java?