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 ?

Answers were Sorted based on User's Feedback



callable is interface or class ?..

Answer / mrangababu

callable is an interface . purpose is to call procedures.

Is This Answer Correct ?    10 Yes 1 No

callable is interface or class ?..

Answer / pratik

interface

Is This Answer Correct ?    8 Yes 1 No

callable is interface or class ?..

Answer / anjani kumar jha

always remember,there r three types of statement interface
in java
1)statement
2)prepared statement
3)callable statement

Is This Answer Correct ?    7 Yes 1 No

callable is interface or class ?..

Answer / 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

callable is interface or class ?..

Answer / kuldeep raaj sharma

The Statement is an interface and its subclasses are
PreparedStatement and CallableStatement.

The Statement interface defines methods for executing SQL
statements that do not contain parameter markers. The
PreparedStatement interface adds methods for setting input
parameters, and the CallableStatement interface adds
methods for retrieving output parameter values returned
from stored procedures.

The CallableStatement interface extends PreparedStatement
with methods for executing and retrieving results from
stored procedures.

Creating a CallableStatement Object
As with Statement and PreparedStatement objects,
CallableStatement objects are created by Connection
objects. CODE EXAMPLE 13-18 shows the creation of a
CallableStatement object for calling the stored
procedure ‘validate’, which has a return parameter and two
other parameters.

CallableStatement cstmt = conn.prepareCall(
“{? = call validate(?, ?)}”);

Setting Parameters
CallableStatement objects may take three types of
parameters: IN, OUT, and
INOUT. The parameter can be specified as either an ordinal
parameter or a named
parameter. A value must be set for each parameter marker in
the statement.
The number, type, and attributes of parameters to a stored
procedure can be
determined using the DatabaseMetaData method
getProcedureColumns.
Parameter ordinals, which are integers passed to the
approriate setter method, refer to the parameter markers
("?") in the statement, starting at one. Literal parameter
values in the statement do not increment the ordinal value
of the parameter markers.
In CODE EXAMPLE the two parameter markers have the ordinal
values 1 and 2.
CallableStatement cstmt = con.prepareCall(
"{CALL PROC(?, "Literal_Value", ?)}");
cstmt.setString(1, "First");
cstmt.setString(2, "Third");

Is This Answer Correct ?    4 Yes 1 No

callable is interface or class ?..

Answer / samsudeen

its interface , used for call the procedure, and able to
call the query

Is This Answer Correct ?    2 Yes 0 No

callable is interface or class ?..

Answer / anjani kumar jha

yes
1)statement
2)prepared statement
3)callable statement
all r interface

Is This Answer Correct ?    2 Yes 0 No

callable is interface or class ?..

Answer / vikaas

Callable is an Interface, used to call Stored Procedures.

Is This Answer Correct ?    1 Yes 0 No

callable is interface or class ?..

Answer / ravi jain

ur question is confusing if its simple Callable then it is in

java.util.concurrent package else
if it is

CallableStatement interface

CallableStatement is an interface its super interfaces are:-

PreparedStatement
Statement

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More JDBC Interview Questions

i am user who logined the application..after that another valid user will also logind..so that is it neccessary to create jdbc connection for each and every user...plz explain it with proper answer...plz help me

5 Answers   IBM,


Diff bet.. Function and Trigger?

3 Answers   Logica CMG,


What are the ddl statements?

0 Answers  


What are the different types of interfaces in the api component?

0 Answers  


What is de-normalization?

1 Answers  


What is the difference between Union, Unionall ?

1 Answers  


How you restrict a user to cut and paste from the html page using java programing?

0 Answers  


How does JDBC differ from ODBC?

7 Answers  


Does jdbctemplate use prepared statements?

0 Answers  


Can resultset be null in java?

0 Answers  


What are the advantages of using preparedstatement in java?

0 Answers  


What is ODBC and JDBC? How do you connect the Database?

0 Answers  


Categories