preparedstatement p= new preparedstatement
is it possible ?

Answer Posted / t.l.n.prasad

no becoz PraparedStatement is an interface we can't
instantiate direcly but we can instantiate like this

PreparedStatement ps=con.PreparedStatement("Query");

where "con" is an Object of Connection interface
ie
Connection con=DriverManager.getConnection();

Is This Answer Correct ?    7 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to check jdbc driver version in sql server?

471


What is benefit of using preparedstatement in java?

486


What are the jdbc api components?

650


What is the significance of DataBaseMetaData.tableIndexStatistics? How to obtain and use it?

508


What is jndi lookup?

507






Where is jdbc url mysql?

493


How does jdbc driver work?

527


What are the steps involved in establishing a connection using jdbc in java?

511


What is statement and resultset in jdbc?

488


How can we execute stored procedures?

563


How can I write to the log used by DriverManager and JDBC drivers?

512


Describe odbc?

551


Why jdbc is used in java?

475


How does a custom RowSetReader get called from a CachedRowSet?

563


What is the difference between ojdbc6 and ojdbc7?

465