Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

callable is interface or class ?

Answer Posted / hazarath k

Yes Callable is an interface. Actually 3 ineterfaces are
provided in java for retreiving the data from DB.Those are:
1.Statement
2.PreparedStatement
3.Callable Statement

Every vendor provide their own implementations for these
interfaces.

If we use Statement object, then the SQL query is parsed
and executed each and every time when the request comes.
If the SQL statement is same but with different values <--
in this scenario no need of parsing each time,only
execution is needed, because same statement is sending to
the server several times but with different values.In this
scenario it is better to parse the statement for first time
only, later onwards it is better to send only values. So in
this situations, it is better to go for
PreparedStatement.It increases the speed also.

If you are planing to call the stored procedures from front
end, then it is better to use Callable statement.

EX(syntax):

Connection con=DriverManager.getConnection("----
","userID","pwd"):
CallableStatement cstmt=con.prepareCall('{call
procedureName}');

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Differentiate between stored procedure and functions?

1007


How do I check in my code whether a maximum limit of database connections have been reached?

951


What is jdbc odbc?

940


Is jdbc object oriented?

882


What are the considerations for deciding on transaction boundaries?

948


What is the meaning of connection?

909


Explain how to make updates to the updatable resultsets.

866


What is 2 phase commit?

1107


State the three different ways in which you can create a table?

911


What is the benefit of having jdbcrowset implementation?

887


What is the benefit of having jdbcrowset implementation? Why do we need a jdbcrowset like wrapper around resultset?

907


How to achieve JDBC Connection Pooling using JDBC DataSource and JNDI in Apache Tomcat Server?

966


What do you mean by two phase commits?

988


Can we have foreign key reference to a non primary key column ?

911


What is the full form of jdbc?

959