Data Warehousing (1107) Databases (3004) JAVA Related 2673) MainFrames (975) Microsoft Related (2296) Networking (553)
Operating Systems (919) Programming (3254) SAP (2318) Testing FAQS (1674) Testing Material (252) Web Related (994)

what is '1000 projects'?

'fullinterview.com' is a educational content website dedicated to finding and realizing final year projects for btech, be, mtech, mca students, here you can search, find your projects and get guidance from experts the below are the different technological projects.
visual Studio projects .net projects, asp projects, c & ds projects, c++ projects (all), cold fusion projects, delphi projects, java projects, perl projects, php projects, sql projects, vc++ projects, visual basic projects.

how it works?

well, everything on this site is submitted by the student and professional community. after you submit your project, it is being verified and approved by our administrator. after approval, other people can read/discuss it, save to favorites.

more number of projects?

here you can find morethan 1000 projects on different technologies, if u want to get more projects please visit our sister sites www.fullinterview.com & Chetanasprojects.com


Category Articles
Two parts of JDBC 2.0 API are
Added on Mon, Dec 28, 2009
Question : Two parts of JDBC 2.0 API are * The JDBC 2.0 core API (the java. sql package), which is included in the JavaTM 2 SDK, Standard Edition * The JDBC 2.0 Optional Package API (the javax.sql package), which is available... Read More
What packages are used by JDBC?
Added on Sun, Dec 27, 2009
There are 8 packages: java. sql.Driver, Connection,Statement, PreparedStatement, CallableStatement, ResultSet, ResultSetMetaData, DatabaseMetaData. Read More
What is the difference between Resultset and Rowset?
Added on Mon, Dec 28, 2009
RowSets are part of JDBC 2.0 API, and there are quite a few implementations to suit your needs (CachedRowSet, JDBCRowSet, WebRowSet). Essentially a row set is a JavaBean that contains database data. The implementation can store the data offline, or... Read More
How to call a Stored Procedure from JDBC?
Added on Sun, Dec 27, 2009
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... Read More
What is the difference between JDBC 1.0 and JDBC 2.0?
Added on Mon, Dec 28, 2009
Additions to JDBC 2.0 core API are 1.) Scrolling Result Sets (TYPE_FORWARD_ONLY ,TYPE_SCROLL_INSENSITIVE,TYPE_SCROLL_SENSITIVE) 2.) Updating Data with Result Sets (statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ... Read More
What are the steps involved in establishing a connection?
Added on Sun, Dec 27, 2009
This involves two steps: (1) loading the driver and (2) making the connection. Read More
how can we connect database in java without using the Class.forname() method with our application?
Added on Mon, Dec 28, 2009
import java.sql.*; class JdbcTest1 { public static void main (String[] args) { try { // Step 1: Load the JDBC driver. Class.forName("sun.jdbc. odbc.JdbcOdbcDriver"); // Step 2: Establish the connection to the database. String... Read More
What is Connection Pooling?
Added on Sun, Dec 27, 2009
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 ideal... Read More
How do you implement Connection Pooling?
Added on Mon, Dec 28, 2009
Connection pooling is performed in the background and does not affect how an application is coded; however, the application must use a DataSource object (an object implementing the DataSource interface) to obtain a connection instead of using the... Read More
How to create Container Managed Persistance program in EJB and tell me the procedure to deploy in Weblogic server.
Added on Mon, Dec 28, 2009
I am using Weblogic 8.1 server. Compile bean and interface program. create jar file. Before the deploy jar file. You must create connection pool in weblogic console. then deploy connection pool. create datasource in... Read More
How to retrieve a whole row of data at once, instead of calling an individual ResultSet.get XXX method for each column?
Added on Mon, Dec 28, 2009
The ResultSet.getXXX methods are the only way to retrieve data from a ResultSet object, which means that you have to make a method call for each column of a row. It is unlikely that this is the cause of a performance problem, however, because it is... Read More
What is the difference between a Driver and a DataSource (in Java JDBC)?
Added on Sun, Dec 27, 2009
Driver is a software that know how to talk with actual database.while datasource is a database where data is store Read More
What are batch updates
Added on Mon, Dec 28, 2009
Batch Update facility allows multiple update operations to be submitted to a database for processing at once. Using batch updates will improve the performance. Read More
Which of the following statement is false regarding the use of setAutoCommit() in JDBC
Added on Mon, Dec 28, 2009
By default the JDBC call is in auto-commit mode. Explanation: by default the JDBC call is in non auto-commit mode Read More
Which Driver is preferable for using JDBC API in Applets.
Added on Mon, Dec 28, 2009
As we know that applets has many restrictions on the remote machine on which they are executed.But they can make connections to the server from which they have been originated.As the database obviously lies on the server side it can make socket... Read More
How can store images in a data base?
Added on Mon, Dec 28, 2009
we can store the image in the database using the blob(binary large object) data type, where the image is stored in the form of the streams... Read More
State true or false :-The JDBC-ODBC bridge from Sun's Java Software does not provide network access to desktop databases like Microsoft access by itself.
Added on Mon, Dec 28, 2009
  False Explanation: Most desktop databases currently require a JDBC solution that uses ODBC underneath. This is because the vendors of these database products haven't implemented all-Java JDBC drivers. The best approach is to use a... Read More
Which of the following allows non repeatable read in JDBC, connection class?
Added on Sun, Dec 27, 2009
TRANSACTION_READ_UNCOMMITTED Read More
what is different between tier and 3 tier?
Added on Sun, Dec 27, 2009
Question is not correct if question is 1-tier and 3-tier Answer then answer his one tier means stand Alon program their is no layers. means program in simple Jsp page with data base connection and display means business logic,view,and their is... Read More
How can you use PreparedStatement?
Added on Sun, Dec 27, 2009
This special type of statement is derived from the more general class, Statement. If you want to execute a Statement object many times, it will normally reduce execution time to use a PreparedStatement object instead. The advantage to this is that... Read More
Which of the following statement is true regarding the three tier model in the JDBC driver model architecture.
Added on Mon, Dec 28, 2009
This the correct answer, A middle tier is introduced in this model. Read More
Which of the following is false regarding the Type 3 JDBC driver
Added on Mon, Dec 28, 2009
Vendors of database middleware products can implement this type of driver into their products to provide interoperability with the greatest number of database servers. Read More
What is stored procedure. How do you create stored procedure?
Added on Sun, Dec 27, 2009
Storedprocedure: Storedprocedure is a set sql statements those are compiled and verified in sql database table. creation of storedprocedure: eg: create or replace procedure <procedure name>(arguments list<in,out,in-out>); ... Read More
What is the purpose of setAutoCommit( )?
Added on Mon, Dec 28, 2009
In java the DML operations by default are committed. If we wish to avoid the commit by default, setAutoCommit(false) has to be called on the Connection object. Once the statements are executed, commit() has to be called on the Connection object... Read More
What is JDBC Driver interface?
Added on Mon, Dec 28, 2009
The JDBC Driver interface provides vendor-specific implementations of the abstract classes provided by the JDBC API. Each vendors driver must provide implementations of the java.sql.Connection, Statement, PreparedStatement, CallableStatement,... Read More
How to Make Updates to Updatable Result Sets?
Added on Mon, Dec 28, 2009
Another new feature in the JDBC 2.0 API is the ability to update rows in a result set using methods in the Java programming language rather than having to send an SQL command. But before you can take advantage of this capability, you need to... Read More
How can we make objects of connection when connection is an interface.e.g. Connection conn = DriverManager.getConnection ????
Added on Mon, Dec 28, 2009
Connection is used for getting a physical connection with database; well there is no need to make any object of Connection. we simply get a reffrence of the database in con. i.e. Connection con = DriverManager.getConnection(url,user,pass); ... Read More
The full form of JDBC is _________________
Added on Mon, Dec 28, 2009
JAVA DATABASE CONNECTIVITY Read More
What is hybernate and spring? can u suggest any books or documents so that i can go through?
Added on Sun, Dec 27, 2009
Hibernate offers persistence and OR(Objet-Relational) mapping for Java/J2EE applications helping them improve performance and scalability. Spring is a light-weight Java framework which paves the way to write faster applications without App... Read More
What is a transaction?
Added on Sun, Dec 27, 2009
Transaction : Transaction is a "Logical unit of work". It must performed by "Either all or Nothing. Submitted by Devarathnam.C (devarathnam@yahoo.co.in) Read More
What are the different types of Statements
Added on Mon, Dec 28, 2009
1.Statement (use createStatement method) 2. Prepared Statement (Use prepareStatement method) 3. Callable Statement (Use prepareCall). Read More
What are the three statements in JDBC & differences between them?
Added on Mon, Dec 28, 2009
Statement Represents a basic SQL statement PreparedStatement Represents a precompiled SQL statement, which can offer improved performance CallableStatement Allows JDBC programs complete access to stored procedures within the database... Read More
What are the steps for connecting to the database using JDBC?
Added on Mon, Dec 28, 2009
Steps for connecting database through JDBC 1 load the Driver Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); this is Type1 driver.Its also called JDBC-ODBC Bridge. 2 Establish the connection conn=DriverManager.getConnection("jdbc:odbc:rahul... Read More
In which case i can use ResultSetMetaData and DatabaseMetaData?
Added on Mon, Dec 28, 2009
If u want to make ur application as idenpendent of the database tables,then u can dynamically retreive the information about the database using the DatabaseMetaData and can retrieve information about the tables in the database using the... Read More
What is an SQL Locator?
Added on Mon, Dec 28, 2009
A Locator is an SQL3 data type that acts as a logical pointer to data that resides on a database server. Read "logical pointer" here as an identifier the DBMS can use to locate and manipulate the data. A Locator allows some manipulation of the data... Read More
How to Retrieve Warnings?
Added on Sun, Dec 27, 2009
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... Read More
What are batch updates?
Added on Sun, Dec 27, 2009
In the java if you want to execute a set of statements, i.e. SQL statements at a time then we use batch update statement. resultset= pst.batchUpdate(); Submitted by - Narendra Kumar ( narendra_altruist @ yahoo . co . in ) Read More
How can you make the connection?
Added on Sun, Dec 27, 2009
In establishing a connection is to have the appropriate driver connect to the DBMS. The following line of code illustrates the general idea: E.g. String url = " jdbc: odbc:Fred"; Connection con = DriverManager.getConnection(url, "Fernanda", ... Read More
How can you create JDBC statements?
Added on Mon, Dec 28, 2009
A Statement object is what sends your SQL statement to the DBMS. You simply create a Statement object and then execute it, supplying the appropriate execute method with the SQL statement you want to send. For a SELECT statement, the method to use is... Read More
What are the common tasks of JDBC?
Added on Mon, Dec 28, 2009
-Create an instance of a JDBC driver or load JDBC drivers through jdbc.drivers -Register a driver -Specify a database -Open a database connection -Submit a query -Receive results. Read More
What?s the difference between TYPE_SCROLL_INSENSITIVE , and TYPE_SCROLL_SENSITIVE?
Added on Mon, Dec 28, 2009
A result set that is TYPE_SCROLL_INSENSITIVE does not reflect changes made while it is still open and one that is TYPE_SCROLL_SENSITIVE does. Read More
How many statements can be created with one connection
Added on Mon, Dec 28, 2009
No upper bound Read More
What is the advantage of using a PreparedStatement?
Added on Mon, Dec 28, 2009
For SQL statements that are executed repeatedly, using a PreparedStatement object would almost always be faster than using a Statement object. This is because creating a PreparedStatement object by explicitly giving the SQL statement causes the... Read More
What Class.forName will do while loading drivers?
Added on Sun, Dec 27, 2009
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. Read More
How can you retrieve data from the ResultSet?
Added on Sun, Dec 27, 2009
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... Read More
What are the flow statements of JDBC?
Added on Sun, Dec 27, 2009
A URL string -->getConnection-->DriverManager-->Driver-->Connection-->Statement-->executeQuery-->ResultSet. Read More
What are the two major components of JDBC?
Added on Sun, Dec 27, 2009
One implementation interface for database manufacturers, the other implementation interface for application and applet writers. Read More
What is JDBC?
Added on Sun, Dec 27, 2009
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... Read More
What are the different types of JDBC drivers?
Added on Mon, Dec 28, 2009
There are many implementations of JDBC drivers out of which some types are: - ? Drivers which implement JDBC API as mapping to another data access API. ? Drivers written in Java programming and in native code. ? Drivers which communicate with... Read More
The cause of failing to load the appropriate JDBC drivers before calling the getConnection method, or it specifying an invalid JDBC URL--one that isn't recognized by your JDBC driver can result in the error __________________ during a call to the Dri
Added on Mon, Dec 28, 2009
When ever an attempt is made to load the invalid driver information compiler time exception arises as Valid Driver Information can not be found Read More
Explain the process of creating tables using NetBeans IDE?
Added on Mon, Dec 28, 2009
Although Vendors provide specific GUI which can create tables, they can also be created using NetBeans IDE. Databases can be created either through pull-down menu or by right clicking database. Clicking on the Tables icon select BBB create table.... Read More
How do you determine the sensitivity of the ResultSet object?
Added on Mon, Dec 28, 2009
Sensitivity of ResultSet object is determined in three ways they are: - 1) TYPE_FORWARD_ONLY: -It contains rows which satisfied the query. These rows are satisfied either at the time of execution or as the rows are retrieved. 2)... Read More
What are the methods which can verify about the cursor particular position?
Added on Mon, Dec 28, 2009
In addition to these methods there are other four methods which let you verify the position of the cursor they are isFirst, isLast, isBeforeFirst, isAfterLast. All these methods return a Boolean statement which allows them to be used in a conditional... Read More
What is thin driver and thick driver.why it is called so?
Added on Mon, Dec 28, 2009
Basic difference between thin and thick client Oracle has a thin client driver, which mean you can connect to a oracle database without the Oracle client installed on your machine. Thick client would need the Oracle Client, database drivers... Read More
Once I have the Java 2 SDK, Standard Edition, from Sun, what else do I need to connect to a database?
Added on Mon, Dec 28, 2009
You still need to get and install a JDBC technology-enabled driver that supports the database that you are using. There are many drivers available from a variety of sources. You can also try using the JDBC- ODBC Bridge if you have ODBC... Read More
Where can I find info, frameworks and example source for writing a JDBC driver?
Added on Mon, Dec 28, 2009
There a several drivers with source available, like MM.MySQL, SimpleText Database, FreeTDS, and RmiJdbc. There is at least one free framework, the jxDBCon-Open Source JDBC driver framework. Any driver writer should also review For Driver Writers. Read More
Which of the following is true regarding the use of the JDBC-ODBC bridge with the applets.
Added on Mon, Dec 28, 2009
Pure Java JDBC drivers work well with applets. They are fully downloadable and do not require any client-side configuration Explanation: the HotJavaTM browser is a Sun java developed browser and hence prevents the security violation which is not... Read More
What does it mean to "materialize" data?
Added on Mon, Dec 28, 2009
This term generally refers to Array, Blob and Clob data which is referred to in the database via SQL locators "Materializing" the data means to return the actual data pointed to by the Locator. For Arrays, use the various forms of getArray() and... Read More
How do I check in my code whether a maximum limit of database connections have been reached?
Added on Mon, Dec 28, 2009
Use DatabaseMetaData.getMaxConnections() and compare to the number of connections currently open. Note that a return value of zero can mean unlimited or, unfortunately, unknown. Of course, driverManager.getConnection() will throw an exception if a... Read More
How can you load the drivers?
Added on Sun, Dec 27, 2009
Loading the driver or drivers you want to use is very simple and involves just one line of code. If, for example, you want to use the JDBC- ODBC Bridge driver, the following code will load it: Eg. Class.forName("sun.jdbc.odbc... Read More
State true or falseCan we retrieve a whole row of data at once, instead of calling an individual ResultSet.getXXX method for each column ?
Added on Mon, Dec 28, 2009
we cannot retrieve a whole row of data at once. In JDBC getXXX() are the methods which are used to get the data from ResultSet by columnwise. Read More
Does the JDBC-ODBC Bridge support multiple concurrent open statements per connection ?
Added on Mon, Dec 28, 2009
True Explanation: You can open only one Statement object per connection when you are using the JDBC-ODBC Bridge. Read More
Explain about the drive manager class working?
Added on Mon, Dec 28, 2009
To manager a set of drivers available to JDBC a driver manager class needs to work with Driver interface. When a client requests for a specific connection by providing a URL it is the responsibility of driver manager to find a driver which can... Read More
What are the different classes through which JDBC represents statements?
Added on Mon, Dec 28, 2009
Statements are represented in JDBC using one of these classes: - ? Statement ? PreparedStatement ? CallableStatement Read More
Explain what should be done when a SQL exception is raised?
Added on Mon, Dec 28, 2009
SQL exception is raised when a data base operation fails. The chances of recovering the lost database is meager apart from logging the file with much detail one can translate the SQL exception into application domain which will eventually result in... Read More
Why do you use a data source object for a connection?
Added on Mon, Dec 28, 2009
Data source object uses a logical name for a data source and this feature increases application portability. This removes the necessity of supplying information to each and every driver. Data source can be configured manually or automatically. Read More
State the three different ways in which you can create a table?
Added on Mon, Dec 28, 2009
Tables can be created in three different ways they are: - 1) Using IDE graphical interface 2) Using ANT framework 3) JDBC SQL written into a framework. Read More
Give an example for getXXX method?
Added on Mon, Dec 28, 2009
This command retrieves the value present in each column. Consider you created a table with name KAR_NAME the first column present in each row stores a value of SQL type VARCHAR. Usual method which can be used for retrieving a value of SQL type... Read More
Does JDBC support stored procedures?
Added on Mon, Dec 28, 2009
Stored procedures form a logical unit which executes certain statements in a predefined format or logic. Most of the DBMS support Stored procedures. A fair amount of variation in the syntax is present. A stored procedure can be invoked from JDBC. Read More
Explain about the main method?
Added on Mon, Dec 28, 2009
For a class to get executed it should contain static public main method. This method also allows you to invoke other methods. When we define classes we not only want other classes to follow it but it should also execute. This is the centralized idea... Read More
Explain about the Try Block?
Added on Mon, Dec 28, 2009
Try and Catch blocks are primarily used for handling exception. Java wants a mechanism which can handle when an exception is thrown. Try block spots the exception and hands it over to catch block which process the exception and deals with it... Read More
Can the JDBC-ODBC Bridge be used with applets?
Added on Mon, Dec 28, 2009
Use of the JDBC-ODBC bridge from an untrusted applet running in a browser, such as Netscape Navigator, isn't allowed. The JDBC-ODBC bridge doesn't allow untrusted code to call it for security reasons. This is good because it means that an... Read More
What is new in JDBC 2.0?
Added on Mon, Dec 28, 2009
With the JDBC 2.0 API, you will be able to do the following: Scroll forward and backward in a result set or move to a specific row (TYPE_SCROLL_SENSITIVE,previous(), last(), absolute(), relative(), etc.) Make updates to database tables using... Read More
Difference between local and global transaction?
Added on Mon, Dec 28, 2009
A transaction is atomic unit of Work.The tasks which are made into the transaction act as a unit which can be executed successfully all,or if at least one task fails to its promise ,then the effect of all the tasks are to be rollbacked.Thus... Read More
What is class in class.forname()?
Added on Mon, Dec 28, 2009
It is defined in java.lang package. And can be used to load driver or native code. For instance the following line is used to load and register the oracle thin dirver in the DriverManager class: Class.forName("oracle. jdbc.driver.OracleDriver")... Read More
How can you configure Type-4 driver in cleandesktop?
Added on Mon, Dec 28, 2009
Type 4 driver is pure java JDBC driver. every database has its own driver classes which are usually distributed through jar files. There is not specific installation for these drivers. If you want to use these drivers, you need to have... Read More
There is a method getColumnCount in the JDBC API. Is there a similar method to find the number of rows in a result set?
Added on Mon, Dec 28, 2009
No, but it is easy to find the number of rows. If you are using a scrollable result set, rs, you can call the methods rs.last and then rs.getRow to find out how many rows rs has. If the result is not scrollable, you can either count the rows by... Read More
If I use the JDBC API, do I have to use ODBC underneath?
Added on Mon, Dec 28, 2009
No, this is just one of many possible solutions. We recommend using a pure Java JDBC technology-enabled driver, type 3 or 4, in order to get all of the benefits of the Java programming language and the JDBC API. Read More
Which of the following statement is false regarding the exceptions in JDBC
Added on Mon, Dec 28, 2009
The JDBC- ODBC Bridge does not support concurrent access from different threads. The JDBC-ODBC Bridge uses synchronized methods to serialize all of the calls that it makes to ODBC. Multi-threaded Java programs may use the Bridge, but they won'... Read More
Which of the following values can be replaced in the place of 1 and 2 belowStatement stmt = con.createStatement(1, 2);
Added on Mon, Dec 28, 2009
ResultSet. TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY Read More
State true or false :- ResultSet.CONCUR_UPDATABLE used with the result set is used to update the rows directly in the database.
Added on Mon, Dec 28, 2009
True Explanation: This is the new feature in the JDBC 2.0 API usage is Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE); Read More
What driver should I use for scalable Oracle JDBC applications?
Added on Mon, Dec 28, 2009
Sun recommends using the thin ( type 4 ) driver. * On single processor machines to avoid JNI overhead. * On multiple processor machines, especially running Solaris, to avoid synchronization bottlenecks. Read More
JDBC-ODBC Bridge does not work with Microsoft J++, because it does not support
Added on Mon, Dec 28, 2009
Java Native Interface Explanation: Any all-Java JDBC driver should work with J++ Read More
How do I set properties for a JDBC driver and where are the properties stored?
Added on Mon, Dec 28, 2009
A JDBC driver may accept any number of properties to tune or optimize performance for the specific driver. There is no standard, other than user and password, for what these properties should be. Therefore, the developer is dependent on the driver... Read More
Why do I get UnsatisfiedLinkError when I try to use my JDBC driver?
Added on Mon, Dec 28, 2009
The first thing is to be sure that this does not occur when running non-JDBC apps. If so, there is a faulty JDK/JRE installation. If it happens only when using JDBC, then it's time to check the documentation that came with the driver or the... Read More
How to insert/update records with some of the columns having NULL value?
Added on Mon, Dec 28, 2009
Use either of the following PreparedStatement methods: public void setNull(int parameterIndex, int sqlType) throws SQLException public void setNull(int paramIndex, int sqlType, String typeName) throws SQLException These methods assume that the... Read More
How many JDBC drivers are there ?
Added on Mon, Dec 28, 2009
JDBC drivers are 4. Read More
Which of the following is false for the Type 1 JDBC bridge driver?
Added on Mon, Dec 28, 2009
Both the database and middle tier need to be Java compliant. Read More
How can I determine where a given table is referenced via foreign keys?
Added on Mon, Dec 28, 2009
DatabaseMetaData.getExportedKeys() returns a ResultSet with data similar to that returned by DatabaseMetaData.getImportedKeys(), except that the information relates to other tables that reference the given table as a foreign key container. Read More
What Class.forName() method will do?
Added on Mon, Dec 28, 2009
To ensure portability and code reuse, the API was designed to be as independent of the version or the vendor of a database as possible. Since different DBMS's have different behavior, we need to tell the driver manager which DBMS we wish to use,... Read More
The full form of ODBC is ___________
Added on Mon, Dec 28, 2009
Yes The full form of ODBC is open database connectivity. Read More
What Class.forName( ) method will do?
Added on Mon, Dec 28, 2009
Class.forName() will load the class dynamically and it will return the object of type class. Read More
How do I create a database connection?
Added on Mon, Dec 28, 2009
The database connection is created in 3 steps: 1. Find a proper database URL (see FAQ on JDBC URL) 2. Load the database driver 3. Ask the Java DriverManager class to open a connection to your database In java code, the steps are realized in... Read More
Which of the following is not an isolation level in the JDBC.
Added on Mon, Dec 28, 2009
TRANSACTION_READ_UNCOMMITTED Read More
Explain in detail about JDBC and its general features?
Added on Mon, Dec 28, 2009
JDBC defines the connectivity pattern between the client and his route to database. Querying and updating method is provided in JDBC. It is primarily based on RelationalDBMS. It is a part of the Java Standard edition. JDBC classes are present in... Read More
Which of the following describes the correct sequence of the steps involved in making a connection with a database.1. Loading the driver2. Process the results.3. Making the connection with the database.4. Executing the SQL statements.
Added on Mon, Dec 28, 2009
Making connection with the database Read More
Explain about multiple implementations and drive manager?
Added on Mon, Dec 28, 2009
JDBC is liberal in the usage and representation of multiple implementations in the same application. It provides a feature by which it allows loading of correct Java packages and registering them with Driver manager. A Driver manager is primarily... Read More
Explain about column name and getter method?
Added on Mon, Dec 28, 2009
Getter methods have column names as inputs and they are case sensitive. In case a column has more than one name or similar names it considers the value of the first name and it returns search for the first name only. If columns are not explicitly... Read More
Explain about Join?
Added on Mon, Dec 28, 2009
Join is very important in JDBC. It joins two or more tables in the database by the commonly shared values present in them. Tables should be created and they should have a common value present in them for joining. You can precede the column name... Read More
How do I start debugging problems related to the JDBC API?
Added on Mon, Dec 28, 2009
A good way to find out what JDBC calls are doing is to enable JDBC tracing. The JDBC trace contains a detailed listing of the activity occurring in the system that is related to JDBC operations. If you use the DriverManager facility to establish... Read More
How to move the cursor in scrollable resultset ?
Added on Mon, Dec 28, 2009
a. create a scrollable ResultSet object. Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY); ResultSet srs = stmt.executeQuery("SELECT COLUMN_1, COLUMN_2 FROM TABLE_NAME"); Read More
How to update a resultset programmatically?
Added on Mon, Dec 28, 2009
a. create a scrollable and updatable ResultSet object. Statement stmt = con.createStatement (ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE); ResultSet uprs = stmt.executeQuery("SELECT COLUMN_1, COLUMN_2 FROM TABLE_NAME"); b. move... Read More
How can I use the JDBC API to access a desktop database like Microsoft Access over the network?
Added on Mon, Dec 28, 2009
Most desktop databases currently require a JDBC solution that uses ODBC underneath. This is because the vendors of these database products haven't implemented all-Java JDBC drivers. The best approach is to use a commercial JDBC driver that... Read More
Are there any ODBC drivers that do not work with the JDBC-ODBC Bridge?
Added on Mon, Dec 28, 2009
Most ODBC 2.0 drivers should work with the Bridge. Since there is some variation in functionality between ODBC drivers, the functionality of the bridge may be affected. The bridge works with popular PC databases, such as Microsoft Access and FoxPro. Read More
What causes the "No suitable driver" error?
Added on Mon, Dec 28, 2009
"No suitable driver" is an error that usually occurs during a call to the DriverManager.getConnection method. The cause can be failing to load the appropriate JDBC drivers before calling the getConnection method, or it can be specifying an invalid... Read More
Why isn't the java.sql.DriverManager class being found?
Added on Mon, Dec 28, 2009
This problem can be caused by running a JDBC applet in a browser that supports the JDK 1.0.2, such as Netscape Navigator 3.0. The JDK 1.0.2 does not contain the JDBC API, so the DriverManager class typically isn't found by the Java virtual... Read More
How web server is connected with appliction server?
Added on Mon, Dec 28, 2009
All the application server needs information about the installed webserver's port and name, through these entries it creates a connector and stored. This connector is used to communicate with App server. Read More
How to insert and delete a row programmatically? (new feature in JDBC 2.0)
Added on Mon, Dec 28, 2009
Make sure the resultset is updatable. 1. move the cursor to the specific position. uprs.moveToCurrentRow(); 2. set value for each column. uprs.moveToInsertRow();//to set up for insert uprs.updateString("col1" "strvalue"); uprs.updateInt... Read More
What is the protocol is used in type4 driver?
Added on Mon, Dec 28, 2009
Driver Name : oracle. jdbc.OracleDriverConnection : jdbc: odbc:thin:@localhost:databasename:1521 Read More
Which one is better to create a thread by implementing Runnable or By Extending Thread in java?
Added on Mon, Dec 28, 2009
Creating a thread by implementing Runnable interface is best. 1. by extends the thread class in the subclass, forther the subclass doesnot extend any other classes. 2. by extending the thread class it overload all the method in the superclass... Read More
What is JDBC Driver interface
Added on Mon, Dec 28, 2009
The JDBC Driver interface provides vendor-specific implementations of the abstract classes provided by the JDBC API. Each vendor driver must provide implementations of the java.sql.Connection,Statement,PreparedStatement, CallableStatement, ResultSet... Read More
What are the steps to do connection pooling in weblogic
Added on Mon, Dec 28, 2009
To do connection pooling in webLogic 9.0 1. Start the weblogic server. 2. Open the weblogic console (url: http://localhost:7001/console) and log on using your username and password. 3. In the left side there is a link "Services". Expand It... Read More
Why does the ODBC driver manager return 'Data source name not found and no default driver specified Vendor: 0'
Added on Mon, Dec 28, 2009
This type of error occurs during an attempt to connect to a database with the bridge. First, note that the error is coming from the ODBC driver manager. This indicates that the bridge-which is a normal ODBC client-has successfully called ODBC, so... Read More
What are the parameters used in Connection pooling?
Added on Mon, Dec 28, 2009
Connection pooling is one the new features introduced in ODBC 3.0. Connection pooling enables an ODBC application to reuse a connection from a pool of connections. Once a connection has been created and placed in the pool, an ODBC application can... Read More
Which type of JDBC driver is the fastest one?
Added on Mon, Dec 28, 2009
JDBC Net pure Java driver(Type IV) is the fastest driver because it converts the jdbc calls into vendor specific protocol calls and it directly interacts with the database. Read More
Is the JDBC-ODBC Bridge multi-threaded?
Added on Mon, Dec 28, 2009
No. The JDBC-ODBC Bridge does not support concurrent access from different threads. The JDBC-ODBC Bridge uses synchronized methods to serialize all of the calls that it makes to ODBC. Multi-threaded Java programs may use the Bridge, but they won'... Read More
What is the need of BatchUpdates?
Added on Mon, Dec 28, 2009
Let's say there are 100 records need to be insert. If we execute normal statemets the no of transactions will be 100 (in terms of connection making to DB). using batch updates we can add 100 rec to batch and the no of transactions will be only... Read More
Does the JDBC-ODBC Bridge support multiple concurrent open statements per connection?
Added on Mon, Dec 28, 2009
No. You can open only one Statement object per connection when you are using the JDBC-ODBC Bridge. Read More
What is the query used to display all tables names in SQL Server (Query analyzer)?
Added on Mon, Dec 28, 2009
select * from information_schema.tables Read More
How can I retrieve a String or other object type without creating a new object each time?
Added on Mon, Dec 28, 2009
Creating and garbage collecting potentially large numbers of objects (millions) unnecessarily can really hurt performance. It may be better to provide a way to retrieve data like strings using the JDBC API without always allocating a new object. ... Read More
Which of the statement below does not correctly defines the difference between JDBC and ODBC ?
Added on Mon, Dec 28, 2009
ODBC requires manual installation of the ODBC driver manager and driver on all client machines. While for JDBC driver are written in Java and JDBC code is automatically installable, secure and portable on all platforms. Explanation: because ODBC... Read More
How many types of JDBC Drivers are present and what are they?
Added on Mon, Dec 28, 2009
There are 4 types of JDBC Drivers Type 1: JDBC-ODBC Bridge Driver Type 2: Native API Partly Java Driver Type 3: Network protocol Driver Type 4: JDBC Net pure Java Driver Read More
State true or false :-The new features in the JDBC 2.0 API is the ability to move a result set?s cursor backward as well as forward.
Added on Mon, Dec 28, 2009
True Explanation: There are also methods that let you move the cursor to a particular row and check the position of the cursor Read More
How to create a custom RowSetMetaData object from scratch?
Added on Mon, Dec 28, 2009
One unfortunate aspect of RowSetMetaData for custom versions is that it is an interface. This means that implementations almost have to be proprietary. The JDBC RowSet package is the most commonly available and offers the sun.jdbc.rowset... Read More
How does a custom RowSetReader get called from a CachedRowSet
Added on Mon, Dec 28, 2009
The Reader must be registered with the CachedRowSet using CachedRowSet.setReader(javax.sql.RowSetReader reader). Once that is done, a call to CachedRowSet.execute() will, among other things, invoke the readData method. Read More
Can I set up a connection pool with multiple user IDs? The single ID we are forced to use causes problems when debugging the DBMS.
Added on Mon, Dec 28, 2009
Since the Connection interface ( and the underlying DBMS ) requires a specific user and password, there's not much of a way around this in a pool. While you could create a different Connection for each user, most of the rationale for a pool... Read More
How can I protect my database password
Added on Mon, Dec 28, 2009
Question : How can I protect my database password ? I'm writing a client-side java application that will access a database over the internet. I have concerns about the security of the database passwords. The client will have access in one way... Read More
How do I implement a RowSetReader? I want to populate a CachedRowSet myself and the documents specify that a RowSetReader should be used. The single method accepts a RowSetInternal caller and returns void. What can I do in the readData method?
Added on Mon, Dec 28, 2009
It can be implemented in a wide variety of ways..." and is pretty vague about what can actually be done. In general, readData() would obtain or create the data to be loaded, then use CachedRowSet methods to do the actual loading. This would usually... Read More
Is possible to open a connection to a database with exclusive mode with JDBC?
Added on Mon, Dec 28, 2009
You cannot open a connection with exclusive mode. Depending on your database engine, you can lock tables or rows in exclusive mode. In Oracle you would create a statement st and run st.execute("lock table mytable in exclusive mode"); Then when you... Read More
Connecting to a database through the Proxy I want to connect to remote database using a program that is running in the local network behind the proxy. Is that possible?
Added on Mon, Dec 28, 2009
Assume that your proxy is set to accept http requests only on port 80. If you want to have a local class behind the proxy connect to the database for you, then you need a servlet/JSP to receive an HTTP request and use the local class to connect to... Read More
Which of the statements are true regarding availability of the integrated version of JDBC API and the JDBC-ODBC Bridge in JDK.
Added on Mon, Dec 28, 2009
The JDK 1.1 and the Java 2 SDK, Standard Edition (formerly known as the JDK 1.2), contain both the JDBC API and the JDBC-ODBC Bridge. Read More
How do I receive a ResultSet from a stored procedure?
Added on Mon, Dec 28, 2009
Stored procedures can return a result parameter, which can be a result set. For a discussion of standard JDBC syntax for dealing with result, IN, IN/OUT and OUT parameters, see Stored Procedures. Read More
How can I write to the log used by DriverManager and JDBC drivers?
Added on Mon, Dec 28, 2009
The simplest method is to use DriverManager.println(String message), which will write to the current log. Read More
How can I get or redirect the log used by DriverManager and JDBC drivers?
Added on Mon, Dec 28, 2009
As of JDBC 2.0, use DriverManager.getLogWriter() and DriverManager.setLogWriter(PrintWriter out). Prior to JDBC 2.0, the DriverManager methods getLogStream() and setLogStream(PrintStream out) were used. These are now deprecated. Read More
Why do I have to reaccess the database for Array, Blob, and Clob data?
Added on Mon, Dec 28, 2009
Most DBMS vendors have implemented these types via the SQL3 Locator type Some rationales for using Locators rather than directly returning the data can be seen most clearly with the Blob type. By definition, a Blob is an arbitrary set of binary data... Read More
Is the JDBC-ODBC bridge multithreaded ?
Added on Mon, Dec 28, 2009
True Explanation: The JDBC-ODBC Bridge uses synchronized methods to serialize all of the calls that it makes to ODBC. Multi-threaded Java programs may use the Bridge, but they won't get the advantages of multi-threading Read More
What is the JDBC syntax for using a literal or variable in a standard Statement?
Added on Mon, Dec 28, 2009
First, it should be pointed out that PreparedStatement handles many issues for the developer and normally should be preferred over a standard Statement. Otherwise, the JDBC syntax is really the same as SQL syntax. One problem that often affects... Read More
What are the considerations for deciding on transaction boundaries?
Added on Mon, Dec 28, 2009
Transaction processing should always deal with more than one statement and a transaction is often described as a Logical Unit of Work ( LUW ). The rationale for transactions is that you want to know definitively that all or none of the LUW completed... Read More
What are the components of the JDBC URL for Oracle's "thin" driver and how do I use them?
Added on Mon, Dec 28, 2009
1. in green the Oracle sub-protocol is related on the driver you are unsign and the protocol to communicate with server. 2. in red the network machine name, or its ip address, to locate the server where oracle is running. 3. in blue the port (it... Read More
Where to use which driver in JAVA?
Added on Mon, Dec 28, 2009
The following is some information I could find on web regarding JDBC drivers: - The following website (not sure about the information) maintains a list of drivers and their use http://www.sqlsummit.com/JDBCVend.htm - A driver can be looked... Read More
Why can't I invoke the ResultSet methods afterLast and beforeFirst when the method next works?
Added on Mon, Dec 28, 2009
You are probably using a driver implemented for the JDBC 1.0 API. You need to upgrade to a JDBC 2.0 driver that implements scrollable result sets. Also be sure that your code has created scrollable result sets and that the DBMS you are using... Read More
What is the difference between setMaxRows(int) and SetFetchSize(int)? Can either reduce processing time?
Added on Mon, Dec 28, 2009
setFetchSize(int) defines the number of rows that will be read from the database when the ResultSet needs more rows. The method in the java. sql.Statement interface will set the 'default' value for all the ResultSet derived from that... Read More
How differ servlet from its peer Technology?
Added on Mon, Dec 28, 2009
Unlike CGI scripts that trigger a new process for each request, Servlets run only one process using a separate Java thread per request. Read More
What JDBC objects generate SQLWarnings?
Added on Mon, Dec 28, 2009
Connections, Statements and ResultSets all have a getWarnings method that allows retrieval. Keep in mind that prior ResultSet warnings are cleared on each new read and prior Statement warnings are cleared with each new execution. getWarnings()... Read More
How can I insert multiple rows into a database in a single transactions
Added on Mon, Dec 28, 2009
//turn off the implicit commit Connection.setAutoCommit(false); //..your insert/update/delete goes here Connection.Commit(); a new transaction is implicitly started. JDBC 2.0 provides a set of methods for executing a batch of database commands.... Read More
What is the difference between client and server database cursors
Added on Mon, Dec 28, 2009
The client side is the current row of the cursor which called a Result (ODBC) or ResultSet ( JDBC). The cursor is a server-side entity only and remains on the server side. Read More
Why do we use prepared statement when already statement is present
Added on Mon, Dec 28, 2009
Actually when u submit a simple statement to the databse, at first the DBMS parses it and sends it back with the result, so again when u send the same statement again the DBMS server parses it and sends back the result so here a lot of time is wasted... Read More
What's the JDBC 3.0 API?
Added on Mon, Dec 28, 2009
The JDBC 3.0 API is the latest update of the JDBC API. It contains many features, including scrollable result sets and the SQL:1999 data types. JDBC (Java Database Connectivity) is the standard for communication between a Java application and a... Read More
Which of the following statements is true regarding the failing of the class.forName in jdk 1.1.x.
Added on Mon, Dec 28, 2009
The correct answer is D. Read More
Which of the following statement is true for the Type 2 JDBC driver?
Added on Mon, Dec 28, 2009
This driver is referred to as a "native-API, partly Java driver." Read More
How can I get information about foreign keys used in a table?
Added on Mon, Dec 28, 2009
DatabaseMetaData.getImportedKeys() returns a ResultSet with data about foreign key columns, tables, sequence and update and delete rules. Read More
Can I use JDBC to execute non-standard features that my DBMS provides?
Added on Mon, Dec 28, 2009
The answer is a qualified yes. As discussed under SQL Conformance: "One way the JDBC API deals with this problem is to allow any query string to be passed through to an underlying DBMS driver. This means that an application is free to use as much... Read More
Which of the following is false for the Type 4 drivers in java
Added on Mon, Dec 28, 2009
As Type 4 drivers are 100% Java, use Java sockets to connect to the database, and require no client-side data access code, they are ideal for applets or other download situations inside a firewall. Read More
What is a JDBC 2.0 DataSource?
Added on Mon, Dec 28, 2009
The DataSource class was introduced in the JDBC 2.0 Optional Package as an easier, more generic means of obtaining a Connection. The actual driver providing services is defined to the DataSource outside the application ( Of course, a production... Read More
Does the database server have to be running Java or have Java support in order for my remote JDBC client app to access the database?
Added on Mon, Dec 28, 2009
The answer should always be no. The two critical requirements are LAN/internet connectivity and an appropriate JDBC driver. Connectivity is usually via TCP/IP, but other communication protocols are possible. Unspoken, but assumed here is that the... Read More
Which of the statements is true regarding loading a driver in JDBC.1. registerDriver(Driver driver).2. Class.forName(java.lang.String driverclass)
Added on Mon, Dec 28, 2009
Both 1 and 2 are correct. A static block is written in every Driver class to register the driver, which gets executed when the class is loaded. Read More
Which Java and java.sql data types map to my specific database types?
Added on Mon, Dec 28, 2009
JDBC is, of necessity, reliant on the driver and underlying DBMS. These do not always adhere to standards as closely as we would like, including differing names for standard Java types. To deal with this, first, there are a number of tables... Read More
What is optimistic concurrency?
Added on Mon, Dec 28, 2009
An optimistic approach dispenses with locks ( except during the actual update ) and usually involves comparison of timestamps, or generations of data to ensure that data hasn't changed between access and update times. It's generally... Read More
Different types of exceptions in JDBC are1. BatchUpdateException2. DataTruncation3. SQLException4. SQLWarning
Added on Mon, Dec 28, 2009
This is the correct answer 1,2,3,4. Read More
What is pessimistic concurrency?
Added on Mon, Dec 28, 2009
With a pessimistic approach, locks are used to ensure that no users, other than the one who holds the lock, can update data. It's generally explained that the term pessimistic is used because the expectation is that many users will try to update... Read More
Which method is static synchronized in JDBC API _________
Added on Mon, Dec 28, 2009
getConnection() Explanation: getConnection() method in DriverManager class.Which is used to get object of Connection interface. Read More
How can I tell if my JDBC driver normalizes java.sql.Date and java.sql.Time objects?
Added on Mon, Dec 28, 2009
To actually determine the values, the objects must be converted to a java.util.Date and examined. See What does normalization mean for java.sql.Date and java.sql.Time? for the definition of normalization. Notice that even a debugger will not show... Read More
JDBC provides facility to store the java objects by using following methods of the PreparedStatement.1. setObject ()2. setBlob()3. setClob()
Added on Mon, Dec 28, 2009
D is the answer. These three methods are used to store the objects. Read More
Which isolation level prevents dirty read in JDBC, connection class.
Added on Mon, Dec 28, 2009
TRANSACTION_READ_ COMMITTED Read More
What is JDO?
Added on Mon, Dec 28, 2009
JDO provides for the transparent persistence of data in a data store agnostic manner, supporting object, hierarchical, as well as relational stores. Read More
When I intersperse table creation or other DDL statements with DML statements, I have a problem with a transaction being commited before I want it to be. Everything ( commit and rollback ) works fine as long as I don't create another table. How can I
Added on Mon, Dec 28, 2009
While the questioner found a partially workable method for his particular DBMS, as mentioned in the section on transactions in my JDBC 2.0 Fundamentals Short Course: DDL statements in a transaction may be ignored or may cause a commit to occur.... Read More
Which of the following allows phantom read in JDBC, connection class?
Added on Mon, Dec 28, 2009
TRANSACTION_REPEATABLE_READ. Read More
What's the best way, in terms of performance, to do multiple insert/update statements, a PreparedStatement or Batch Updates?
Added on Mon, Dec 28, 2009
Because PreparedStatement objects are precompiled, their execution can be faster than that of Statement objects. Consequently, an SQL statement that is executed many times is often created as a PreparedStatement object to increase efficiency. A... Read More
The interface _____________ helps us in retrieving the information about the database.
Added on Mon, Dec 28, 2009
java.sql.DatabaseMetaData. Read More
How to do result set on a page where the user can sort on the column headers?
Added on Mon, Dec 28, 2009
One possibility: Have an optional field in your form or GET url called (appropriately) ORDER with a default value of either "no order" or whatever you want your default ordering to be (i.e. timestamp, username, whatever). When you get your request,... Read More
What is the importance in context in jdbc connection pools?
Added on Mon, Dec 28, 2009
Connection pooling is one of the way to increase the performance of the jdbc connectivity in client server technology. It optimizes the time taken acquire a new connection on every request by maintaining a pool of connections by the connection pool... Read More
Why doesn't JDBC accept URLs instead of a URL string?
Added on Mon, Dec 28, 2009
In order for something to be a java.net.URL, a protocol handler needs to be installed. Since there is no one universal protocol for databases behind JDBC, the URLs are treated as strings. In Java 1.4, these URL strings have a class called java.net... Read More
what is savepoint?
Added on Mon, Dec 28, 2009
Save point is a feature using which we can save status of the transaction to a perticular extent.so that if anytime we have lost a transaction we can get it back using save point. Read More
What does normalization mean for java.sql.Date and java.sql.Time?
Added on Mon, Dec 28, 2009
These classes are thin wrappers extending java.util.Date, which has both date and time components. java.sql.Date should carry only date information and a normalized instance has the time information set to zeros. java.sql.Time should carry only time... Read More
What is metadata?
Added on Mon, Dec 28, 2009
Basically, Metadata is data about data. In context of JDBC, there may be two types of metadata. 1. Describing information about the Resultset object. i.e, if u have applied a query that fetches some result. this metadata describes information... Read More
What scalar functions can I expect to be supported by JDBC?
Added on Mon, Dec 28, 2009
JDBC supports numeric, string, time, date, system, and conversion functions on scalar values. For a list of those supported and additional information, see section A.1.4 Support Scalar Functions in the JDBC Data Access API For Driver Writers. Note... Read More
If 4 different drivers are loaded, & created 4 different statements calling diffener tables from same database, how driver is recognized for each statement?
Added on Mon, Dec 28, 2009
1. JDBC connects to DB through Driver 2. When we use a Driver, we need to do 3 things: a) Load driver class; b) Create instance of it; c) Register it into DriverManager. But in real life, it's very luck that we can realize these... Read More
What does setFetchSize() really do?
Added on Mon, Dec 28, 2009
The API documentation explains it pretty well, but a number of programmers seem to have a misconception of its functionality. The first thing to note is that it may do nothing at all; it is only a hint, even to a JDBC Compliant driver. setFetchSize... Read More
Is there a practical limit for the number of SQL statements that can be added to an instance of a Statement object
Added on Mon, Dec 28, 2009
While the specification makes no mention of any size limitation for Statement.addBatch(), this seems to be dependent, as usual, on the driver. Among other things, it depends on the type of container/collection used. I know of at least one driver that... Read More
Which is the best driver among the 4 jdbc drivers?how can we load that driver?
Added on Mon, Dec 28, 2009
Use Type 4 driver for applet to database communication. 2. Use Type 2 driver for two tiered applications for communication between java client and the database that gives better performance when compared to Type1 driver 3. Use Type 1 driver if... Read More
How can I determine whether a Statement and its ResultSet will be closed on a commit or rollback?
Added on Mon, Dec 28, 2009
Use the DatabaseMetaData methods supportsOpenStatementsAcrossCommit() and supportsOpenStatementsAcrossRollback(). Read More
How do I create an updatable ResultSet?
Added on Mon, Dec 28, 2009
Just as is required with a scrollable ResultSet, the Statement must be capable of returning an updatable ResultSet. This is accomplished by asking the Connection to return the appropriate type of Statement using Connection.createStatement(int... Read More
How to get the resultset of stroedProcedure
Added on Mon, Dec 28, 2009
By invoking the getObject on the CallableStatement.CallableStatement proc = conn.prepareCall("{ ? = call " + functionSql + " }");proc.registerOutParameter(1, Types.OTHER);proc.execute();ResultSet results = (ResultSet) proc.getObject(1); Read More
How can I connect to an Oracle database not on the web server from an untrusted applet?
Added on Mon, Dec 28, 2009
You can use the thin ORACLE JDBC driver in an applet (with some extra parameters on the JDBC URL). Then, if you have NET8, you can use the connection manager of NET8 on the web server to proxy the connection request to the database server. Read More
What packages are used by JDBC
Added on Mon, Dec 28, 2009
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 java.sql.CallableStatement Provides access to and... Read More
How can I pool my database connections so I don't have to keep reconnecting to the database?
Added on Mon, Dec 28, 2009
There are plenty of connection pool implementations described in books or availalble on the net. Most of them implement the same model. The process is always the same : * you gets a reference to the pool * you gets a free connection from the pool... Read More
How can I connect to an Excel spreadsheet file using jdbc?
Added on Mon, Dec 28, 2009
Let's say you have created the following Excel spreadsheet in a worksheet called Sheet1 (the default sheet name). And you've saved the file in c:users.xls. USERID FIRST_NAME LAST_NAME pkua Peter Kua jlsmith John Smith gh2312 Everett... Read More
While in CallableStatament using in the oracle my procedure is return no.of columns so in java
Added on Mon, Dec 28, 2009
Answers: In procedure u will have some out parameter with datatype. so according to that we will have to set in callablestatement object registerOutParameter(7,OracleTypes.VARCHAR2 or or INTEGER or CURSOR); Read More
How can resultset records be restricted to certain rows?
Added on Mon, Dec 28, 2009
The easy answer is "Use a JDBC 2.0 compliant driver". With a 2.0 driver, you can use the setFetchSize() method within a Statement or a ResultSet object. For example, Statement stmt = con.createStatement(); stmt.setFetchSize(400); ResultSet rs ... Read More
How do I insert an image file (or other raw data) into a database?
Added on Mon, Dec 28, 2009
All raw data types (including binary documents or images) should be read and uploaded to the database as an array of bytes, byte[]. Originating from a binary file, 1. Read all data from the file using a FileInputStream. 2. Create a byte array... Read More
What are the steps for connecting to the database using JDBC
Added on Mon, Dec 28, 2009
Here are the steps. Using Driver Manager: 1. Load the driver class using class.forName(driverclass) and class.forName() loads the driver class and passes the control to DriverManager class 2.DriverManager.getConnection() creates the connection to... Read More
How can I connect from an applet to a database on the server?
Added on Mon, Dec 28, 2009
There are two ways of connecting to a database on the server side. 1. The hard way. Untrusted applets cannot touch the hard disk of a computer. Thus, your applet cannot use native or other local files (such as JDBC database drivers) on your hard... Read More
How do you implement Connection Pooling
Added on Mon, Dec 28, 2009
Connection Pooling can be implemented by the following way. * A javax. sql.ConnectionPoolDataSource interface that serves as a resource manager connection factory for pooled java.sql.Connection objects. Each database vendors provide the... Read More
Which is the preferred collection class to use for storing database result sets
Added on Mon, Dec 28, 2009
When retrieving database results, the best collection implementation to use is the LinkedList. The benefits include: * Retains the original retrieval order * Has quick insertion at the head/tail * Doesn't have an internal size limitation... Read More
What does ResultSet actually contain? Is it the actual data of the result or some links to databases? If it is the actual data then why can't we access it after connection is closed?
Added on Mon, Dec 28, 2009
A ResultSet is an interface. Its implementation depends on the driver and hence ,what it "contains" depends partially on the driver and what the query returns. For example with the Odbc bridge what the underlying implementation layer contains is... Read More
How do I extract the SQL statements required to move all tables and views from an existing database to another database?
Added on Mon, Dec 28, 2009
The operation is performed in 9 steps: 1. Open a connection to the source database. Use the DriverManager class. 2. Find the entire physical layout of the current database. Use the DatabaseMetaData interface. 3. Create DDL SQL statements for re... Read More
How does the Java Database Connectivity (JDBC) work?
Added on Mon, Dec 28, 2009
The JDBC is used whenever a Java application should communicate with a relational database for which a JDBC driver exists. JDBC is part of the Java platform standard; all visible classes used in the Java/database communication are placed in package... Read More
What is Metadata and why should I use it?
Added on Mon, Dec 28, 2009
Metadata ('data about data') is information about one of two things: 1. Database information (java. sql.DatabaseMetaData), or 2. Information about a specific ResultSet (java.sql.ResultSetMetaData). Use DatabaseMetaData to find... Read More





   copy right ® all rights reserved by www.fullinterview.com