preparedstatement p= new preparedstatement
is it possible ?

Answer Posted / surya, samcomm technologies pv

yes, but that is not the way to create object for the
interface. using Anonymous inner class.

syntax...

PreparedStatement ps=new PreparedStatement() {

U should implement all the methods of this
interface inside this block.

};

or if u feel this is overhead, then simply get the
reference for this interface in the following way.

PreparedStatement ps=con.prepareStatement("query");

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are 4 drivers available in JDBC? At what situation are four of the drivers used?

534


What is difference between odbc and jdbc?

504


What are the advantages of database connection pooling?

489


How do you determine the sensitivity of the ResultSet object?

545


Jdbc-odbc bridge is multi-threaded or not?

531






State the different connection methods used for creating different types of sql.

500


Which Java and java.sql data types map to my specific database types?

539


What is the advantage of namedparameterjdbctemplate?

507


Write an sql to find all records having all upper case alphanumeric characters in a field ?

530


Can I get a null resultset?

548


What is jdbc connection string?

506


What are the types of statements in jdbc?

527


How can you create jdbc statements?

531


Why do we use jdbc?

515


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

588