what is callable statement?
Answers were Sorted based on User's Feedback
Answer / harish
the JDBC Callable statement provides a mechanism to call
stored procedures in a standardized,database independent
way. The JDBC callable statement hides the differences in
stored procedure implementation,execution and parameter
handling from Java applications.
| Is This Answer Correct ? | 46 Yes | 5 No |
Answer / devarathnam c,kotagudibanda(po
Hi... CallableStatement : It is an interface in JDBC
API,which can be used to calling the storedprocedures and
functions in backend like oracle,sybase.
Syntax:
CallableStatement cst=con.prepareCall("{call <procedure
name>(?,?)}");
| Is This Answer Correct ? | 34 Yes | 6 No |
Answer / sanjeev gupta
Callable Statemnt Example:- Here we prsent a stored
procedure fetuser(int userid) taht takes user id as
parameter and returns the first_name and last_name column
of the user.
try {
CallableStatement callablestmt =
con.prepareCall("{call fetchuser(?)}");
callablestmt.setInt(1,1);
ResultSet rs1 = callablestmt.executeQuery();
while(rs1.next())
{
String fname = rs1.getString("FIRST_NAME");
String lname = rs1.getString("LAST_NAME");
out.println(fname+" "+lname+ "<br />");
}
} catch (SQLException e) {
e.printStackTrace();
}
| Is This Answer Correct ? | 21 Yes | 6 No |
Answer / manojkumar.l
It's using for execute stored procedure and also execute
multiple select statement
| Is This Answer Correct ? | 15 Yes | 7 No |
Answer / chandrarekha
connection statement provides the preparecall() method
which is used to create callabale statement....and it's
derived from the prepared statement interface...it can be
used to create stored procedures or to use the existing
stored procedures
| Is This Answer Correct ? | 19 Yes | 12 No |
Answer / bama
the JDBC Callable statement provides a mechanism to call
stored procedures in a standardized,database independent
way. The JDBC callable statement hides the differences in
stored procedure implementation,execution and parameter
handling from Java applications.
| Is This Answer Correct ? | 6 Yes | 5 No |
What is meant by connection string?
What is the difference between triggers and procedures?
write down exceptions those appear in java programs when u write JDBC Programs?
code to insert values/rows into oracle database from a java swing textfield when a button is pressed(using preparedstatements)
What is jdbc? Describe the steps needed to execute a sql query using jdbc.
i have 1000 records in resultset, how to get first 100 records from resultset, because resultset fetch all 1000 records at a time?
password, is stored in as plain text. What can I do to protect my passwords?
How can we maintain the integrity of a database by using jdbc?
Which package contains jdbc api?
Is jdbc a protocol?
Why are we using blob datatypes in jdbc?
Give steps to connect to the db using jdbc?