संपादित करें

इसके माध्यम से साझा किया गया


JDBC driver API reference

Download JDBC driver

Overview

The Microsoft JDBC Driver for SQL Server provides an API that can be used within Java programming code to connect to and interact with a Microsoft SQL Server database.

JavaDoc.io website is primary

The Microsoft JDBC API Reference documentation is hosted for your viewing on the JavaDoc.io website. JavaDoc.io is now our primary website for JDBC reference documentation. Our JDBC reference documentation on JavaDoc.io is available at the following direct link:

JavaDoc.io has our JDBC reference documentation starting with version 6.0.

Only legacy JDBC documentation is here on docs

The JDBC API Reference documentation here on this website is no longer being updated. However, the articles here do contain the reference for JDBC driver versions 4.1 and 4.2.

Documentation for JDBC driver version 6.0, and some later versions, is also here. For any version 6.0 or later, use the JavaDoc.io website.

Important notes

Note

For conceptual information about using the JDBC driver, see Overview of the JDBC Driver.

Important

For JDBC 4.1 and 4.2 compliance support, use Microsoft JDBC Driver 4.2 (or higher) for SQL Server. The previous Microsoft JDBC Drivers 4.1 and 4.0 releases do not support new methods introduced with JDBC 4.1 or 4.2.

API details for JDBC 4.1 compliance are not in this section. See JDBC 4.1 Compliance for the JDBC Driver.

API details for JDBC 4.2 compliance are not found in this section. See JDBC 4.2 Compliance for the JDBC Driver.

API details for Bulk Copy, available starting with Microsoft JDBC Driver 4.2 for SQL Server, are not found in this section. See Using Bulk Copy with the JDBC Driver.

API details for Always Encrypted, available starting with Microsoft JDBC Driver 6.0 for SQL Server, are not found in this section. See Always Encrypted API Reference for the JDBC Driver

API details for Using Table-Valued Parameters, available starting with Microsoft JDBC Driver 6.0 for SQL Server, are not found in this section. See Using Table-Valued Parameters

Microsoft JDBC Driver 12.2 and above supports compilation with JDK 8.0 and all Java versions 11.0 and up.

Microsoft JDBC Driver 11.2 supports compilation with JDK 8.0, 11.0, 17.0, and 18.0.

Microsoft JDBC Driver 10.2 supports compilation with JDK 8.0, 11.0, and 17.0.

Microsoft JDBC Driver 9.4 supports compilation with JDK 8.0, 11.0, and 16.0.

Microsoft JDBC Driver 9.2 supports compilation with JDK 8.0, 11.0, and 15.0.

Microsoft JDBC Driver 8.4 supports compilation with JDK 8.0, 11.0, and 14.0.

Microsoft JDBC Driver 8.2 supports compilation with JDK 8.0, 11.0, and 13.0.

Microsoft JDBC Driver 7.4 supports compilation with JDK 8.0, 11.0, and 12.0.

Microsoft JDBC Driver 7.2 supports compilation with JDK 8.0, and 11.0.

Microsoft JDBC Driver 7.0 supports compilation with JDK 8.0, and 10.0.

Microsoft JDBC Driver 6.4 supports compilation with JDK 7.0, 8.0, and 9.0.

Microsoft JDBC Driver 6.2 supports compilation with JDK 7.0, and 8.0.

Microsoft JDBC Drivers 6.0 and 4.2 support compilation with JDK 5.0, 6.0, 7.0, and 8.0.

Microsoft JDBC Driver 4.1 supports compilation with JDK 5.0, 6.0, and 7.0.

Interfaces

Interface Name Description
ISQLServerCallableStatement Interface Lets you specify the stored procedure name to call along with input and output parameters.
ISQLServerConnection Interface Represents a JDBC connection to a SQL Server database.
SQLServerDataSource Class Represents a list of properties specific to connecting to a SQL Server database by using a ISQLServerConnection object.
ISQLServerPreparedStatement Represents the basic implementation of JDBC prepared statement functionality.
ISQLServerResultSet Represents a JDBC result set.
ISQLServerStatement Represents the basic implementation of JDBC statement functionality.

Classes

Class Name Description
DateTimeOffset Represents an object of type microsoft.sql.DateTimeOffset.
SQLServerBlob Represents a binary large object (BLOB).
SQLServerCallableStatement Implements ISQLServerCallableStatement.
SQLServerClob Represents a character large binary object (CLOB).
SQLServerConnection Implements ISQLServerConnectopn.
SQLServerConnectionPoolDataSource Represents physical database connections for connection pool managers.
SQLServerDatabaseMetaData Represents the metadata for the database.
SQLServerDataSource Represents a list of properties specific to connecting to a SQL Server database by using a SQLServerConnection object.
SQLServerDataSourceObjectFactory Represents an object factory to materialize data sources from the Java Naming and Directory Interface (JNDI).
SQLServerDriver Represents the JDBC driver. This class includes methods for connecting to a SQL Server database, and for obtaining information about the JDBC driver.
SQLServerException Represents an unsuccessful or incomplete running of a SQL statement.
SQLServerNClob Class Represents a character large binary object using the National Character Set.
SQLServerParameterMetaData Represents the metadata for prepared statement parameters.
SQLServerPooledConnection Represents a physical database connection in a connection pool.
SQLServerPreparedStatement Implements ISQLServerPreparedStatement.
SQLServerResource Represents a localized error string resource. This class is intended for internal use only.
SQLServerResultSet Implements ISQLServerResultSet.
SQLServerResultSetMetaData Represents the metadata of the columns that are contained within a result set.
SQLServerSavepoint Represents the checkpoint to which a transaction can be rolled back.
SQLServerStatement Implements ISQLServerStatement.
SQLServerXAConnection Represents JDBC connections that can participate in distributed (XA) transactions.
SQLServerXADataSource Represents a factory for SQLServerXAConnection objects that is used internally.
SQLServerXAResource Represents an XAResource for XA distributed transaction management.

See also

Overview of the JDBC driver