can someone tell me how does preparedstatement works? its
an interface and where is the implementation?

Answers were Sorted based on User's Feedback



can someone tell me how does preparedstatement works? its an interface and where is the implementa..

Answer / sk.bilal ahmed

A SQL statement is precompiled and stored in a
PreparedStatement object. This object can then be used to
efficiently execute this statement multiple times.

Note: The setter methods (setShort, setString, and so on)
for setting IN parameter values must specify types that are
compatible with the defined SQL type of the input
parameter. For instance, if the IN parameter has SQL type
INTEGER, then the method setInt should be used.

Is This Answer Correct ?    3 Yes 0 No

can someone tell me how does preparedstatement works? its an interface and where is the implementa..

Answer / krishna

suppose if the string contains same select statement with
different set of values then fo for PreparedStatement..

ex:String str="select ename,eage from emp where ename=?";

yes it is interface provided by java soft people in their
api specification

Is This Answer Correct ?    2 Yes 0 No

can someone tell me how does preparedstatement works? its an interface and where is the implementa..

Answer / sreekanth madamanchi

1. Yes PreparedStatement is and interface. It was in
java.sql package.
2. PreparedStatement interface creates an object that
represents a precompiled SQL statement. By using this we
can protect from SQL Injection.

Is This Answer Correct ?    1 Yes 3 No

Post New Answer

More J2EE Interview Questions

What is a java developer?

0 Answers  


What is jlayeredpane java?

0 Answers  


What is java api for xml processing (jaxp)?

0 Answers  


Which is latest technology in java?

0 Answers  


Is java part of oracle?

0 Answers  






which method does it invokes automatically when we click link in the webpage a)put b)get c)head d)post

7 Answers  


why we are using XML?

14 Answers   TCS,


Why java is a platform?

0 Answers  


What are container services?

0 Answers  


Explain about J2EE Application Architecture

1 Answers  


What is the difference between java and core java?

0 Answers  


What is javaserver pages standard tag library (jstl)?

0 Answers  


Categories