Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package unsch.efpis.ConexionDB;
- import java.sql.Connection;
- import java.sql.DriverManager;
- import java.sql.SQLException;
- /**
- * @author esyrss@gmail.com
- * @author sin_querer@hotmail.com
- */
- public class Conexion {
- private static Connection cn = null;
- private static String URLAccess = "jdbc:odbc:ADB";
- private static String usuario = "usuarioaccess";
- private static String contrasena = "123456";
- public static Connection getConexion() throws SQLException, ClassNotFoundException {
- Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
- cn = DriverManager.getConnection(URLAccess,usuario,contrasena);
- return cn;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement