Package com.microsoft.sqlserver.jdbc

## Class SQLServerDriver

- java.lang.Object
- - com.microsoft.sqlserver.jdbc.SQLServerDriver

All Implemented Interfaces:
  `Driver`

    public final class SQLServerDriver
    extends Object
    implements Driver

Provides methods to connect to a SQL Server database and to obtain information about the JDBC driver.

### Constructor Summary

Constructors
`SQLServerDriver()` Creates a SQLServerDriver object

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`boolean` `acceptsURL​(String url)`
`Connection` `connect​(String url, Properties suppliedProperties)`
`static void` `deregister()` De-registers the driver with the DriverManager.
`int` `getMajorVersion()`
`int` `getMinorVersion()`
`Logger` `getParentLogger()`
`DriverPropertyInfo[]` `getPropertyInfo​(String url, Properties info)`
`static boolean` `isRegistered()` Checks whether the driver has been registered with the driver manager.
`boolean` `jdbcCompliant()`
`static void` `register()` Registers the driver with DriverManager.
`String` `toString()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### SQLServerDriver

    public SQLServerDriver()

Creates a SQLServerDriver object

### Method Detail

#### toString

    public final String toString()

Overrides:
  `toString` in class `Object`

#### register

    public static void register()
                         throws SQLException

Registers the driver with DriverManager. No-op if driver is already registered.

Throws:
  `SQLException` - if error

#### deregister

    public static void deregister()
                           throws SQLException

De-registers the driver with the DriverManager. No-op if the driver is not registered.

Throws:
  `SQLException` - if error

#### isRegistered

    public static boolean isRegistered()

Checks whether the driver has been registered with the driver manager.

Returns:
  if the driver has been registered with the driver manager

#### connect

    public Connection connect​(String url,
                              Properties suppliedProperties)
                       throws SQLServerException

Specified by:
  `connect` in interface `Driver`
Throws:
  `SQLServerException`

#### acceptsURL

    public boolean acceptsURL​(String url)
                       throws SQLServerException

Specified by:
  `acceptsURL` in interface `Driver`
Throws:
  `SQLServerException`

#### getPropertyInfo

    public DriverPropertyInfo[] getPropertyInfo​(String url,
                                                Properties info)
                                         throws SQLServerException

Specified by:
  `getPropertyInfo` in interface `Driver`
Throws:
  `SQLServerException`

#### getMajorVersion

    public int getMajorVersion()

Specified by:
  `getMajorVersion` in interface `Driver`

#### getMinorVersion

    public int getMinorVersion()

Specified by:
  `getMinorVersion` in interface `Driver`

#### getParentLogger

    public Logger getParentLogger()

Specified by:
  `getParentLogger` in interface `Driver`

#### jdbcCompliant

    public boolean jdbcCompliant()

Specified by:
  `jdbcCompliant` in interface `Driver`