GeekInterview.com
Series: Subject: Topic:

JDBC Interview Questions

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

What class.Forname will do while loading drivers?

Asked By: Interview Candidate | Asked On: Jul 16th, 2005

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.

Answered by: M.Nithiyanandhan on: Oct 17th, 2005

it is used tom initialize the driver .

Answered by: deepak on: 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?

Asked By: Interview Candidate | Asked On: Jul 16th, 2005

There are 8 packages: Java.Sql.Driver, connection,statement, preparedstatement, callablestatement, resultset, resultsetmetadata, databasemetadata.

Answered by: geetha on: Oct 4th, 2005

Packages are

java.sql and javax.sql only..

Those mentioned in the previous lists are the classes & interfaces in those packages.

Answered by: Jaime on: Jul 16th, 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?

Asked By: Interview Candidate | Asked On: Jun 2nd, 2005

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...

Answered by: Siladitya Chatterjee on: 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 ...

Answered by: Sreekanth Chinthalapalli on: 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?

Asked By: Interview Candidate | Asked On: Jul 16th, 2005

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 =...

Answered by: guptach on: 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();

Answered by: Jaime on: Jul 16th, 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?

Asked By: Interview Candidate | Asked On: Jul 16th, 2005

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.

Answered by: guptach on: Sep 22nd, 2005

JDBC is a core API of Java 1.1 and later which provides a standard set of interfaces to SQL-compliant databases.

Answered by: Jaime on: Jul 16th, 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

Asked By: Interview Candidate | Asked On: Apr 16th, 2005

Answered by: Chidambara Gupta. Cheedella on: 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...

Answered by: sendil on: Sep 12th, 2005

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

What are the different types of statements?

Asked By: Interview Candidate | Asked On: Jun 2nd, 2005

1.Statement (use createstatement method) 2. Prepared statement (use preparestatement method) and 3. Callable statement (use preparecall)

Answered by: Sreekanth on: Jun 2nd, 2005

try {  Connection conn = DriverManager.getConnection("URL",'USER"."PWD");  //For Simple statement used for static query. Statement stmt = conn.createStatement();  &n...

How to retrieve warnings?

Asked By: Interview Candidate | Asked On: Aug 27th, 2004

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...

First | Prev | | Next | Last Page

 

 

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Ads

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.