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
What do you mean by boolean?
Explain an intermediate language?
How to declare an arraylist in java?
Can we use static class instead of singleton?
What is assembly used for?
can rmi and corba based applications interact ?
What is super?
What is downcasting?
What is command line argument
Write a program to reverse a number in java?
Can Exception handling we can handle multiple catch blocks?
What is composition in java?
What is the difference between throw and throws in java?
What does flagged out mean?
how we can make a write-only class in java?