/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package function.database;

import java.sql.DriverManager;
import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author Administrator
 */
public class Connection {

    //
    private static final String SQLSERVER_DATABASE_NAME = "coffeemaster";
    private static final String SQLSERVER_DATABASE_USERNAME = "sa";
    private static final String SQLSERVER_DATABASE_PASSWORD = "123";
    //
    
    public static java.sql.Connection buildSQLServerConnection() {
        final String SQLSERVER_DATABASE_URL = "jdbc:sqlserver://localhost:1433;databaseName=" + SQLSERVER_DATABASE_NAME;
        try {
            return DriverManager.getConnection(SQLSERVER_DATABASE_URL, SQLSERVER_DATABASE_USERNAME, SQLSERVER_DATABASE_PASSWORD);
        } catch (SQLException ex) {
        }
        return null;
    }
    
    
}
