Found 317 Articles for JDBC

Java DatabaseMetaData getDriverName() method with example

Arushi
Updated on 30-Jul-2019 22:30:26

267 Views

The getDriverName() method of the DatabaseMetaData interface returns the name of the JDBC driver used.To get the name of the JDBC driver used to connect with the database.Make sure your database is up and running.Register the driver using the registerDriver() method of the DriverManager class. Pass an object of the driver class corresponding to the underlying database.Get the connection object using the getConnection() method of the DriverManager class. Pass the URL the database and, user name, password of a user in the database, as String variables.Get the DatabaseMetaData object with respect to the current connection using the getMetaData() method of ... Read More

Java DatabaseMetaData getMaxBinaryLiteralLength() method with example.

Smita Kapse
Updated on 30-Jul-2019 22:30:26

52 Views

The getMaxBinaryLiteralLength() method of the DatabaseMetaData interface is used to find out the maximum number of characters (hex) that the underlying database allows for a binary literal.This method returns an integer value, representing the maximum length of a binary literal. If this value is 0 it indicates that there is no limit or, limit is unknown.To get the DatabaseMetaData object −Make sure your database is up and running.Register the driver using the registerDriver() method of the DriverManager class. Pass an object of the driver class corresponding to the underlying database.Get the connection object using the getConnection() method of the DriverManager ... Read More

Java DatabaseMetaData getDriverMinorVersion() method with example

Arushi
Updated on 30-Jul-2019 22:30:26

53 Views

The getDriverMinorVersion() method of the DatabaseMetaData interface returns the minor version of the JDBC driver used.To get the minor version of the JDBC driver used to connect with the database −Make sure your database is up and running.Register the driver using the registerDriver() method of the DriverManager class. Pass an object of the driver class corresponding to the underlying database.Get the connection object using the getConnection() method of the DriverManager class. Pass the URL the database and, user name, password of a user in the database, as String variables.Get the DatabaseMetaData object with respect to the current connection using the ... Read More

Java DatabaseMetaData getDefaultTransactionIsolation() method with example

Arushi
Updated on 30-Jul-2019 22:30:26

82 Views

In a database system where more than one transaction is being executed simultaneously and in parallel, the property of isolation states that all the transactions will be carried out and executed as if it is the only transaction in the system. No transaction will affect the existence of any other transaction.The getDefaultTransactionIsolation() method of the DatabaseMetaData interface returns the default isolation level of the underlying database in integer format.To know the default transaction isolation of the underlying database −Make sure your database is up and running.Register the driver using the registerDriver() method of the DriverManager class. Pass an object of ... Read More

Java DatabaseMetaData getColumns() method with example

Arushi
Updated on 30-Jul-2019 22:30:26

3K+ Views

This method retrieves the description of the columns of a table. It accepts 4 parameters −catalog - A string parameter representing the name (or, name pattern) of the catalog (database in general) in which the table (that contains the columns of which you need to retrieve the description about) exists. pass "" to get the description of the columns in tables with no catalog and, pass null if you don't want to use catalog and thus narrow the search.schemaPattern - A String parameter representing the name (or, name pattern) of the schema of the table, pass "" if in case ... Read More

Java DatabaseMetaData getDatabaseMajorVersion() method with example

Arushi
Updated on 30-Jul-2019 22:30:26

176 Views

The getDatabaseMajorVersion() method of the DatabaseMetaData interface returns the major version of the underlying database in integer format.To get major version of the underlying database −Make sure your database is up and running.Register the driver using the registerDriver() method of the DriverManager class. Pass an object of the driver class corresponding to the underlying database.Get the connection object using the getConnection() method of the DriverManager class. Pass the URL the database and, user name, password of a user in the database, as String variables.Get the DatabaseMetaData object with respect to the current connection using the getMetaData() method of the Connection ... Read More

Java DatabaseMetaData getDatabaseMinorVersion() method with example

Rishi Raj
Updated on 30-Jul-2019 22:30:26

70 Views

The getDatabaseMinorVersion() method of the DatabaseMetaData interface returns the minor version of the underlying database in integer format.To get the list of minor version of the underlying database −Make sure your database is up and running.Register the driver using the registerDriver() method of the DriverManager class. Pass an object of the driver class corresponding to the underlying database.Get the connection object using the getConnection() method of the DriverManager class. Pass the URL the database and, user name, password of a user in the database, as String variables.Get the DatabaseMetaData object with respect to the current connection using the getMetaData() method ... Read More

Java DatabaseMetaData getDatabaseProductName() method with example

Vikyath Ram
Updated on 30-Jul-2019 22:30:26

659 Views

The getDatabaseProductName() method of the DatabaseMetaData interface returns the name of the underlying database in String format.To know the name of the underlying database −Make sure your database is up and running.Register the driver using the registerDriver() method of the DriverManager class. Pass an object of the driver class corresponding to the underlying database.Get the connection object using the getConnection() method of the DriverManager class. Pass the URL the database and, user name, password of a user in the database, as String variables.Get the DatabaseMetaData object with respect to the current connection using the getMetaData() method of the Connection interface.Finally ... Read More

Java DatabaseMetaData getDatabaseProductVersion() method with example

Vikyath Ram
Updated on 30-Jul-2019 22:30:26

217 Views

The getDatabaseProductVersion() method of the DatabaseMetaData interface returns the version number of the underlying database in String format.To get the version of the underlying database −Make sure your database is up and running.Register the driver using the registerDriver() method of the DriverManager class. Pass an object of the driver class corresponding to the underlying database.Get the connection object using the getConnection() method of the DriverManager class. Pass the URL the database and, user name, password of a user in the database, as String variables.Get the DatabaseMetaData object with respect to the current connection using the getMetaData() method of the Connection ... Read More

Java DatabaseMetaData getCatalogs() method with example

Rishi Raj
Updated on 30-Jul-2019 22:30:26

537 Views

In general a catalog is a directory which holds information about data sets, file or, a database. Whereas in a database catalog holds the list of all the databases, base tables, views (virtual tables), synonyms, value ranges, indexes, users, and user groups.The getCatalogs() method of the DatabaseMetaData interface returns the name of the underlying database in String format.To get the list of catalogs of the database at an instance −Make sure your database is up and running.Register the driver using the registerDriver() method of the DriverManager class. Pass an object of the driver class corresponding to the underlying database.Get the ... Read More

Advertisements