Handling Metadata with the JDBC Driver

DownloadDownload JDBC Driver

The Microsoft JDBC Driver for SQL Server can be used to work with metadata in a SQL Server database in a variety of ways. The JDBC driver can be used to get metadata about the database, a result set, or parameters.

The JDBC driver provides three classes for retrieving metadata from a SQL Server database:

  • SQLServerDatabaseMetaData, which is used to return information about the database that is currently connected.

  • SQLServerResultSetMetaData, which is used to return information about the result set.

  • SQLServerParameterMetaData, which is used to return information about the parameters of prepared and callable statements.

    The topics in this section describe how you can use each of the three metadata classes to work with metadata in a SQL Server database.

Note

The metadata methods discussed in this section are generally expensive in terms of application performance, so care should be taken with their usage.

In This Section

Topic Description
Using Database Metadata Describes how to retrieve metadata information about the currently connected database.
Using Result Set Metadata Describes how to retrieve metadata information about the current result set.
Using Parameter Metadata Describes how to retrieve metadata information about the parameters of prepared and callable statements.

See Also

Overview of the JDBC Driver