can someone tell me how does preparedstatement works? its
an interface and where is the implementation?
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
What does resource adapt module contain?
What does java awt stand for?
how to run servlet program between two computer through internet ?
Is java a web technology?
Possible ways for debugging java ,javascript,jsp and servlet. Can we use System.out.println debugging java.
how dopost is secured than doget?
What is external entity?
what is the difference between Tomcat 4 & Tomcat 5?
Every field has setter and getter methods.what is happening in this methods.
Is java still slow?
What is architecture neutral in java?
What is a jpanel in java?