/**
 * 
 */
package conecta.access.java7;

import java.io.Serializable;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

import static java.lang.System.*;

/**
 * @author ?
 *
 */
public class ConectaAccess implements Serializable {

	public static Connection getConexion() {
		try {
			conexion = DriverManager.getConnection(URL_CONECTA, "", "");
			out.println("Conexión a la base fue correcta");
			return conexion;
		} catch (SQLException e) {
			out.printf("%s%n", e.getCause());
			return conexion;
		}
	}

	/**
	 * 
	 */
	private static final long serialVersionUID = -781270325428384267L;
	private static Connection conexion = null;
	private static final String URL_CONECTA = "jdbc:odbc:Accesso";
}
