JDBC Interview Questions

Showing Questions 141 - 148 of 148 Questions
First | Prev | Next | Last Page
Sort by: 
 | 
Jump to Page:
  •  

    What Class.forName will do while loading drivers?

    It is used to create an instance of a driver and register it with the DriverManager. When you have loaded a driver, it is available for making a connection with a DBMS.

    M.Nithiyanandhan

    • Oct 17th, 2005

    It is used tom initialize the driver .

    deepak

    • Sep 24th, 2005

    class.forName()method create an  instance of specified driver, loads that driver, and then register that driver with the DriverManager class.

  •  

    What packages are used by JDBC?

    There are 8 packages: java.sql.Driver, Connection,Statement, PreparedStatement, CallableStatement, ResultSet, ResultSetMetaData, DatabaseMetaData.

    geetha

    • Oct 4th, 2005

    Packages arejava.sql and javax.sql only..Those mentioned in the previous lists are the classes & interfaces in those packages.

    Jaime

    • Jul 17th, 2005

    java.sql.BatchUpdatException Provides information about errors that occurred during batch operations   java.sql.Blob Provides access to and manipulation of Binary Large Object data  ...

  •  

    How can you retrieve data from the ResultSet?

    First JDBC returns results in a ResultSet object, so we need to declare an instance of the class ResultSet to hold our results. The following code demonstrates declaring the ResultSet object rs.E.g.ResultSet rs = stmt.executeQuery("SELECT COF_NAME, PRICE FROM COFFEES");Second:String s = rs.getString("COF_NAME");The method getString is invoked on the ResultSet object rs , so getString will retrieve...

    Siladitya Chatterjee

    • Sep 29th, 2005

    import java.sql.*;class JDBCtableread{ public static void main(String args[])throws Exception { try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); String url="jdbc:odbc:dsn2";//dsn name ...

    Sreekanth Chinthalapalli

    • Jun 2nd, 2005

    Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery(SELECT COF_NAME, PRICE FROM COFFEES"); while (rs .next() ) {  //Iam assuming there are 3 columns in th...

  •  

    How to call a Stored Procedure from JDBC?

    The first step is to create a CallableStatement object. As with Statement an and PreparedStatement objects, this is done with an open Connection object. A CallableStatement object contains a call to a stored procedure;E.g.CallableStatement cs = con.prepareCall("{call SHOW_SUPPLIERS}");ResultSet rs = cs.executeQuery();

    guptach

    • Sep 23rd, 2005

    Stored Procedures can be called in java by using the prepareCall() method which returns a CallableStatement object.CallableStatement cs = con.prepareCall("{call Procedure_name}");ResultSet rs = cs.executeQuery();

    Jaime

    • Jul 17th, 2005

    This document demonstrates how to return a JDBC ResultSet as REF CURSOR from a Java Stored Procedure. JDBC ResultSet is a table of data representing a database, which is usually generated by executing...

  •  

    What is JDBC?

    JDBC is a layer of abstraction that allows users to choose between databases. It allows you to change to a different database engine and to write to a single API. JDBC allows you to write database applications in Java without having to concern yourself with the underlying details of a particular database.

    Jaime

    • Jul 17th, 2005

    Call-level interfaces such as JDBC are programming interfaces allowing external access to SQL database manipulation and update commands. They allow the integration of SQL calls into a general programm...

  •  

    What are batch updates

    Chidambara Gupta. Cheedella

    • Sep 21st, 2005

    Batch Updates are nothing but a bunch of updations that are done at a time without interruption. All the update statements are added to a Batch by using the addBatch() method and the Batch is&nbs...

    sendil

    • Sep 12th, 2005

    we can add batch system using add.batch();

  •  

    How to Retrieve Warnings?

    SQLWarning objects are a subclass of SQLException that deal with database access warnings. Warnings do not stop the execution of an application, as exceptions do; they simply alert the user that something did not happen as planned. A warning can be reported on a Connection object, a Statement object (including PreparedStatement and CallableStatement objects), or a ResultSet object. Each of these classes...

Showing Questions 141 - 148 of 148 Questions
First | Prev | Next | Last Page
Sort by: 
 | 
Jump to Page: