Top JDBC Interview Questions :: ALLInterview.com http://www.allinterview.com Top JDBC Interview Questions en-us What is execute(), executeUpdate() and executeQuery() methods? http://www.allinterview.com/showanswers/2608.html execute() - will do the querying the database & also the update,insert,delete on the database. executeUpdate() - only the update,insert,delete on the database. executeQuery() - only the querying the database. what exactly happens when we execute &quot;Class.forname(&quot;Driver http://www.allinterview.com/showanswers/11016.html By using this coding we load the driver. Class is a predefined class and forName is the static method of the class. which is used to load the driver in the memory for connectivity. For eg Class.forName("sun.jdbc.odbc.JdbcOdbcDriver&quo What is JDBC and ODBC and what are the differences between them? http://www.allinterview.com/showanswers/2594.html 1.ODBC is for Microsoft and JDBC is for java applications. 2.ODBC can't be directly used with Java because it uses a C interface. 3.ODBC makes use of pointers which have been removed totally from java. 4.ODBC mixes simple and advanced fea what does the method Class.forName returns? http://www.allinterview.com/showanswers/32620.html static Class<?> forName(String className) Returns the Class object associated with the class or interface with the given string name. what is callable statement? http://www.allinterview.com/showanswers/6709.html the JDBC Callable statement provides a mechanism to call stored procedures in a standardized,database independent way. The JDBC callable statement hides the differences in stored procedure implementation,execution and parameter handling from give me a java code snippet to connect Microsoft excel through.... I http://www.allinterview.com/showanswers/36369.html Use Apache POI. They have provided all the api, for creating, updating, writing. http://poi.apache.org/hssf/quick-guide.html Difference between Generic Servlet and HTTP Servlet? http://www.allinterview.com/showanswers/4935.html Generic servlet is Protocol independent HTTP Servlet is protocol dependent i have 1000 records in resultset, how to get first 100 records from http://www.allinterview.com/showanswers/69860.html ResultSet.getRow() will give you the row number where the resultset cursor is in , check for ResultSet.getRow()==100 and then break out of the loop what is connection pooling? http://www.allinterview.com/showanswers/29222.html Ans: With servlets, opening a database connection is a major bottleneck because we are creating and tearing down a new connection for every page request and the time taken to create connection will be more. Creating a connection pool is an id What does Class.forName return? http://www.allinterview.com/showanswers/2581.html The Class.forName( String name ) returns a java.lang.Class object associated with the class or interface with the specified fully qualified name. preparedstatement p= new preparedstatement is it possible ? http://www.allinterview.com/showanswers/58545.html dfg callable is interface or class ? http://www.allinterview.com/showanswers/58546.html interface What is PreparedStatement? http://www.allinterview.com/showanswers/6708.html Some times it is more convinient to use this for sending SQL statements to the DBMS. The main feature , which distinguishes it from its super class statement is that unlike statement,it is given an SQL statement right when it is created. This wahts is mean by primary key and unique key? http://www.allinterview.com/showanswers/37091.html Primery Key:- A column or set of columns that uniquely identify all the rows in a table. Primary keys do not allow null values. No two rows can have the same primary key value; therefore, a primary key value always uniquely identifies a singl How to find total column from a resultset? http://www.allinterview.com/showanswers/58183.html int columnCnt = java.sql.ResultSetMetaData.getColumnCount();