package com.tfs.irp.util.importdata;
import java.sql.Connection;
import java.sql.SQLException;
public class DBConnection {
public static Connection getConnection() throws SQLException {
String sDriverName=”com.mysql.jdbc.Driver”;
String sUrl=”jdbc:mysql://localhost:3306/tfs”;
String sUserName=”XXX”;
String sPassword=”XXX”;
Connection conn = null;
try {
Class.forName(sDriverName);
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
conn = java.sql.DriverManager.getConnection(sUrl, sUserName,
sPassword);
return conn;
}
}