Posts

Showing posts with the label JDBC Metadata

JDBC Metadata

The simple meaning of metadata is data about data. There are two metadata available in the JDBC API - ResultSetMetaData and DatabaseMetaData .                                           ResultSetMetaData It is used to make descriptive information about ResultSet object, like; number of columns, name of columns and dataype of columns. It does not provide any information regarding database and how many rows are available in the ResultSet object. Whether ResultSet is read only, updatable or scrollable. This is useful when you don't have any information about the columns of the table. First we have to create object of ResultSetMetadata by calling getMetaData() method from ResultSet object.  Syntax :               ResultSetMetaData rsmd=res.getMetaData();  The following are common methods in ResultSetMetadata interfac...

JDBC TUTORIAL

Image
What is JDBC? A JDBC driver is a software component enabling a Java application to interact with a database.It is a specification that tells vendor how to write a driver program to interface java program with their database. The JDBC driver gives out the connection to the database and implements the protocol for transferring the query and result between client and database. JDBC helps you to write Java applications that manage these three programming activities: 1.      Connect to a data source, like a database 2.      Send queries and update statements to the database 3.      Retrieve and process the results received from the database in answer to your query What are we going to cover in this tutorial?? * JDBC Architecture                                               * Types Of JDBC Drivers * Ste...