java.lang.Object
com.microsoft.sqlserver.jdbc.SQLServerDriver
- All Implemented Interfaces:
java.sql.Driver
public final class SQLServerDriver
extends java.lang.Object
implements java.sql.Driver
Provides methods to connect to a SQL Server database and to obtain information about the JDBC driver.
-
Constructor Summary
Constructors Constructor Description SQLServerDriver()Creates a SQLServerDriver object -
Method Summary
Modifier and Type Method Description booleanacceptsURL(java.lang.String url)java.sql.Connectionconnect(java.lang.String Url, java.util.Properties suppliedProperties)static voidderegister()De-registers the driver with the DriverManager.intgetMajorVersion()intgetMinorVersion()java.util.logging.LoggergetParentLogger()java.sql.DriverPropertyInfo[]getPropertyInfo(java.lang.String Url, java.util.Properties Info)static booleanisRegistered()Checks whether the driver has been registered with the driver manager.booleanjdbcCompliant()static voidregister()Registers the driver with DriverManager.java.lang.StringtoString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Constructor Details
-
SQLServerDriver
public SQLServerDriver()Creates a SQLServerDriver object
-
-
Method Details
-
toString
public final java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-
register
public static void register() throws java.sql.SQLExceptionRegisters the driver with DriverManager. No-op if driver is already registered.- Throws:
java.sql.SQLException- if error
-
deregister
public static void deregister() throws java.sql.SQLExceptionDe-registers the driver with the DriverManager. No-op if the driver is not registered.- Throws:
java.sql.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 java.sql.Connection connect(java.lang.String Url, java.util.Properties suppliedProperties) throws SQLServerException- Specified by:
connectin interfacejava.sql.Driver- Throws:
SQLServerException
-
acceptsURL
- Specified by:
acceptsURLin interfacejava.sql.Driver- Throws:
SQLServerException
-
getPropertyInfo
public java.sql.DriverPropertyInfo[] getPropertyInfo(java.lang.String Url, java.util.Properties Info) throws SQLServerException- Specified by:
getPropertyInfoin interfacejava.sql.Driver- Throws:
SQLServerException
-
getMajorVersion
public int getMajorVersion()- Specified by:
getMajorVersionin interfacejava.sql.Driver
-
getMinorVersion
public int getMinorVersion()- Specified by:
getMinorVersionin interfacejava.sql.Driver
-
getParentLogger
public java.util.logging.Logger getParentLogger()- Specified by:
getParentLoggerin interfacejava.sql.Driver
-
jdbcCompliant
public boolean jdbcCompliant()- Specified by:
jdbcCompliantin interfacejava.sql.Driver
-