Java Utililty Methods JDBC SQLServer Connection

List of utility methods to do JDBC SQLServer Connection

Description

The list of methods to do JDBC SQLServer Connection are organized into topic(s).

Method

voidGetConnection()
Get Connection
if (dbConnection == null) {
    Class.forName(dbDriverName);
    dbConnection = DriverManager.getConnection(dbConnectionStr, sUser, sPassWord);
ConnectiongetConnection()
Returns a connection for database.
Connection connection = null;
try {
    Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver").newInstance();
    connection = DriverManager.getConnection(
            "jdbc:sqlserver://<server>.database.windows.net;databaseName=Company", "<user>@<server>",
            "<password>");
} catch (InstantiationException e) {
    e.printStackTrace();
...
ConnectiongetConnection()
get Connection
if (!propertiesLoaded)
    getProperties();
Connection conn = null;
try {
    Class.forName("net.sourceforge.jtds.jdbc.Driver");
    conn = DriverManager.getConnection(connectionString, userName, password);
} catch (ClassNotFoundException e) {
    e.printStackTrace();
...