What is the use of prepared statement?Ans:used to execute
pre compiled statement...so the question is when that
precompiled statement will be execute or
comiple?................

Answer Posted / narasimha rao bodagala

Hey this is an interface.

in the jdbc API they designed all the interface. which you
can use any interface based on that you can create the
implemented class method.

for this you can call in the core java design
pattern..abstract factory pattren..

you can try to see the API you can understand more.

preparedstatement---pre compiled statement.

first time it's compile and second time it will pass
dynamically.

make sure that should be done in DB side only once.

one time compile and next time passing the values into the
query then execute.

overall story behind this one time compile many times execute.

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is savepoint in jdbc?

708


How can I know when I reach the last record in a table, since JDBC doesn't provide an EOF method?

790


Which is best database for java?

756


Is jdbc a framework?

689


What are the measures to connect to the db using jdbc?

693


Does jdbc use ssl?

711


What is SQL Warning? How to retrieve SQL warnings in the JDBC program?

787


What port does jdbc use?

730


Is jdbc secure?

716


What are the classes and methods used for sending sql statements to database?

776


Is it possible to connect to multiple databases? Using single statement can we update or extract data from two or three or many databases?

826


Does jdbctemplate use prepared statements?

700


What is odbc and jdbc in dbms?

742


How can you make the connection using jdbc?

800


Which jdbc driver is the fastest driver?

803