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

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

599


What happens if we don't close the connection in jdbc?

499


If you are truncated using JDBC, how can you that how much data is truncated?

596


What is jdbc odbc bridge?

514


Is jdbc object oriented?

512






Compare jdbc and odbc and how is jdbc required in this context.

532


How do you determine the sensitivity of the ResultSet object?

554


What is jdbc architecture?

528


What are the different types of drivers under jdbc?

481


What is the full form of jdbc?

502


What is getconnection method in java?

515


How can you create jdbc statements?

546


What are the different types of locking in JDBC?

581


Why would you use setautocommit(false) in jdbc?

676


What is JDBC Batch Processing and what are it’s benefits?

519