1. Trang chủ
  2. » Luận Văn - Báo Cáo

Khóa luận tốt nghiệp Tài chính Ngân hàng: Phân tích hoạt động kinh doanh tại Agribank chi nhánh huyện Vĩnh Thuận, tỉnh Kiên Giang giai đoạn 20102012

119 2 0
Tài liệu được quét OCR, nội dung có thể không chính xác
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 119
Dung lượng 10,79 MB

Nội dung

Khóa luận tốt nghiệp Tài chính Ngân hàng: Phân tích hoạt động kinh doanh tại Agribank chi nhánh huyện Vĩnh Thuận, tỉnh Kiên Giang giai đoạn 20102012 được thực hiện với mục tiêu nhằm phân tích hoạt động kinh doanh tại Agribank chi nhánh huyện Vĩnh Thuận, tỉnh Kiên Giang trong giai đoạn 20102012 để có những giải pháp nhằm giúp hoạt động kinh doanh sắp... Đề tài Hoàn thiện công tác quản trị nhân sự tại Công ty TNHH Mộc Khải Tuyên được nghiên cứu nhằm giúp công ty TNHH Mộc Khải Tuyên làm rõ được thực trạng công tác quản trị nhân sự trong công ty như thế nào từ đó đề ra các giải pháp giúp công ty hoàn thiện công tác quản trị nhân sự tốt hơn trong thời gian tới.

Trang 1

package connectDB; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; public class ConnectDB {

public static Connection con = null; private static ConnectDB instance = new ConnectDB(); public static ConnectDB getInstance() {

return instance; }

public void connect() throws SQLException {

String url = "jdbc:sqlserver://localhost:1433;database name=QLNVIEN"; String user = "sa"; String pw = "123"; con = DriverManager.getConnection(url, user, pw); if(con != null) {

System.out.println("thanh cong"); }

} public void disconnect() {

if(con != null) { try {

con.close(); } catch (Exception e) {

// TODO: handle exception e.printStackTrace(); }

} }

public static Connection getConnection() { return con; }

Trang 2

public class ConnectDB {

public static Connection con = null; private static ConnectDB instance = new ConnectDB(); public static ConnectDB getInstance() {

return instance; }

public void connect() throws SQLException {

String url = "jdbc:sqlserver://localhost:1433;database name=QLNVIEN"; String user = "sa"; String pw = "123"; con = DriverManager.getConnection(url, user, pw); if(con != null) {

System.out.println("thanh cong"); }

} public void disconnect() {

if(con != null) { try {

con.close(); } catch (Exception e) {

// TODO: handle exception e.printStackTrace(); }

} }

public static Connection getConnection() { return con; }

Trang 3

package connectDB; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; public class ConnectDB {

public static Connection con = null; private static ConnectDB instance = new ConnectDB(); public static ConnectDB getInstance() {

return instance; }

public void connect() throws SQLException {

String url = "jdbc:sqlserver://localhost:1433;database name=QLNVIEN"; String user = "sa"; String pw = "123"; con = DriverManager.getConnection(url, user, pw); if(con != null) {

System.out.println("thanh cong"); }

} public void disconnect() {

if(con != null) { try {

con.close(); } catch (Exception e) {

// TODO: handle exception e.printStackTrace(); }

} }

public static Connection getConnection() { return con; }

Trang 4

public class ConnectDB {

public static Connection con = null; private static ConnectDB instance = new ConnectDB(); public static ConnectDB getInstance() {

return instance; }

public void connect() throws SQLException {

String url = "jdbc:sqlserver://localhost:1433;database name=QLNVIEN"; String user = "sa"; String pw = "123"; con = DriverManager.getConnection(url, user, pw); if(con != null) {

System.out.println("thanh cong"); }

} public void disconnect() {

if(con != null) { try {

con.close(); } catch (Exception e) {

// TODO: handle exception e.printStackTrace(); }

} }

public static Connection getConnection() { return con; }

Trang 5

package connectDB; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; public class ConnectDB {

public static Connection con = null; private static ConnectDB instance = new ConnectDB(); public static ConnectDB getInstance() { return instance; }

public void connect() throws SQLException {

String url = "jdbc:sqlserver://localhost:1433;database name=QLNVIEN"; String user = "sa"; String pw = "123"; con = DriverManager.getConnection(url, user, pw); if(con != null) {

System.out.println("thanh cong"); }

} public void disconnect() {

if(con != null) { try {

con.close(); } catch (Exception e) {

// TODO: handle exception e.printStackTrace(); }

} }

public static Connection getConnection() { return con; }

Trang 6

public class ConnectDB {

public static Connection con = null; private static ConnectDB instance = new ConnectDB(); public static ConnectDB getInstance() {

return instance; }

public void connect() throws SQLException {

String url = "jdbc:sqlserver://localhost:1433;database name=QLNVIEN"; String user = "sa"; String pw = "123"; con = DriverManager.getConnection(url, user, pw); if(con != null) {

System.out.println("thanh cong"); }

} public void disconnect() {

if(con != null) { try {

con.close(); } catch (Exception e) {

// TODO: handle exception e.printStackTrace(); }

} }

public static Connection getConnection() { return con; }

Trang 7

package connectDB; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; public class ConnectDB {

public static Connection con = null; private static ConnectDB instance = new ConnectDB(); public static ConnectDB getInstance() { return instance; }

public void connect() throws SQLException {

String url = "jdbc:sqlserver://localhost:1433;database name=QLNVIEN"; String user = "sa"; String pw = "123"; con = DriverManager.getConnection(url, user, pw); if(con != null) {

System.out.println("thanh cong"); }

} public void disconnect() {

if(con != null) { try {

con.close(); } catch (Exception e) {

// TODO: handle exception e.printStackTrace(); }

} }

public static Connection getConnection() { return con; }

Trang 8

public class ConnectDB {

public static Connection con = null; private static ConnectDB instance = new ConnectDB(); public static ConnectDB getInstance() {

return instance; }

public void connect() throws SQLException {

String url = "jdbc:sqlserver://localhost:1433;database name=QLNVIEN"; String user = "sa"; String pw = "123"; con = DriverManager.getConnection(url, user, pw); if(con != null) {

System.out.println("thanh cong"); }

}

public void disconnect() { if(con != null) { try {

con.close(); } catch (Exception e) {

// TODO: handle exception e.printStackTrace(); }

} }

public static Connection getConnection() { return con; }

Trang 9

package connectDB; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; public class ConnectDB {

public static Connection con = null; private static ConnectDB instance = new ConnectDB(); public static ConnectDB getInstance() {

return instance; }

public void connect() throws SQLException {

String url = "jdbc:sqlserver://localhost:1433;database name=QLNVIEN"; String user = "sa"; String pw = "123"; con = DriverManager.getConnection(url, user, pw); if(con != null) {

System.out.println("thanh cong"); }

} public void disconnect() {

if(con != null) { try {

con.close(); } catch (Exception e) {

// TODO: handle exception e.printStackTrace(); }

} }

public static Connection getConnection() { return con; }

Trang 10

public class ConnectDB {

public static Connection con = null; private static ConnectDB instance = new ConnectDB(); public static ConnectDB getInstance() { return instance; }

public void connect() throws SQLException {

String url = "jdbc:sqlserver://localhost:1433;database name=QLNVIEN"; String user = "sa"; String pw = "123"; con = DriverManager.getConnection(url, user, pw); if(con != null) {

System.out.println("thanh cong"); }

} public void disconnect() {

if(con != null) { try {

con.close(); } catch (Exception e) {

// TODO: handle exception e.printStackTrace(); }

} }

public static Connection getConnection() { return con; }

Trang 11

package connectDB; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; public class ConnectDB {

public static Connection con = null; private static ConnectDB instance = new ConnectDB(); public static ConnectDB getInstance() { return instance; }

public void connect() throws SQLException {

String url = "jdbc:sqlserver://localhost:1433;database name=QLNVIEN"; String user = "sa"; String pw = "123"; con = DriverManager.getConnection(url, user, pw); if(con != null) {

System.out.println("thanh cong"); }

} public void disconnect() {

if(con != null) { try {

con.close(); } catch (Exception e) {

// TODO: handle exception e.printStackTrace(); }

} }

public static Connection getConnection() { return con; }

Trang 12

public class ConnectDB {

public static Connection con = null; private static ConnectDB instance = new ConnectDB(); public static ConnectDB getInstance() { return instance; }

public void connect() throws SQLException {

String url = "jdbc:sqlserver://localhost:1433;database name=QLNVIEN"; String user = "sa"; String pw = "123"; con = DriverManager.getConnection(url, user, pw); if(con != null) {

System.out.println("thanh cong"); }

} public void disconnect() {

if(con != null) { try {

con.close(); } catch (Exception e) {

// TODO: handle exception e.printStackTrace(); }

} }

public static Connection getConnection() { return con; }

Trang 13

package connectDB; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; public class ConnectDB {

public static Connection con = null; private static ConnectDB instance = new ConnectDB(); public static ConnectDB getInstance() {

return instance; }

public void connect() throws SQLException {

String url = "jdbc:sqlserver://localhost:1433;database name=QLNVIEN"; String user = "sa"; String pw = "123"; con = DriverManager.getConnection(url, user, pw); if(con != null) {

System.out.println("thanh cong"); }

}

public void disconnect() { if(con != null) { try {

con.close(); } catch (Exception e) {

// TODO: handle exception e.printStackTrace(); }

} }

public static Connection getConnection() { return con; }

Trang 14

public class ConnectDB {

public static Connection con = null; private static ConnectDB instance = new ConnectDB(); public static ConnectDB getInstance() {

return instance; }

public void connect() throws SQLException {

String url = "jdbc:sqlserver://localhost:1433;database name=QLNVIEN"; String user = "sa"; String pw = "123"; con = DriverManager.getConnection(url, user, pw); if(con != null) {

System.out.println("thanh cong"); }

} public void disconnect() {

if(con != null) { try {

con.close(); } catch (Exception e) {

// TODO: handle exception e.printStackTrace(); }

} }

public static Connection getConnection() { return con; }

Trang 15

package connectDB; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; public class ConnectDB {

public static Connection con = null; private static ConnectDB instance = new ConnectDB(); public static ConnectDB getInstance() {

return instance; }

public void connect() throws SQLException {

String url = "jdbc:sqlserver://localhost:1433;database name=QLNVIEN"; String user = "sa"; String pw = "123"; con = DriverManager.getConnection(url, user, pw); if(con != null) {

System.out.println("thanh cong"); }

}

public void disconnect() { if(con != null) { try {

con.close(); } catch (Exception e) {

// TODO: handle exception e.printStackTrace(); }

} }

public static Connection getConnection() { return con; }

Trang 16

public class ConnectDB {

public static Connection con = null; private static ConnectDB instance = new ConnectDB(); public static ConnectDB getInstance() { return instance; }

public void connect() throws SQLException {

String url = "jdbc:sqlserver://localhost:1433;database name=QLNVIEN"; String user = "sa"; String pw = "123"; con = DriverManager.getConnection(url, user, pw); if(con != null) {

System.out.println("thanh cong"); }

} public void disconnect() {

if(con != null) { try {

con.close(); } catch (Exception e) {

// TODO: handle exception e.printStackTrace(); }

} }

public static Connection getConnection() { return con; }

Trang 17

package connectDB; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; public class ConnectDB {

public static Connection con = null; private static ConnectDB instance = new ConnectDB(); public static ConnectDB getInstance() { return instance; }

public void connect() throws SQLException {

String url = "jdbc:sqlserver://localhost:1433;database name=QLNVIEN"; String user = "sa"; String pw = "123"; con = DriverManager.getConnection(url, user, pw); if(con != null) {

System.out.println("thanh cong"); }

} public void disconnect() {

if(con != null) { try {

con.close(); } catch (Exception e) {

// TODO: handle exception e.printStackTrace(); }

} }

public static Connection getConnection() { return con; }

Trang 18

public class ConnectDB {

public static Connection con = null; private static ConnectDB instance = new ConnectDB(); public static ConnectDB getInstance() {

return instance; }

public void connect() throws SQLException {

String url = "jdbc:sqlserver://localhost:1433;database name=QLNVIEN"; String user = "sa"; String pw = "123"; con = DriverManager.getConnection(url, user, pw); if(con != null) {

System.out.println("thanh cong"); }

} public void disconnect() {

if(con != null) { try {

con.close(); } catch (Exception e) {

// TODO: handle exception e.printStackTrace(); }

} }

public static Connection getConnection() { return con; }

Trang 19

package connectDB; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; public class ConnectDB {

public static Connection con = null; private static ConnectDB instance = new ConnectDB(); public static ConnectDB getInstance() { return instance; }

public void connect() throws SQLException {

String url = "jdbc:sqlserver://localhost:1433;database name=QLNVIEN"; String user = "sa"; String pw = "123"; con = DriverManager.getConnection(url, user, pw); if(con != null) {

System.out.println("thanh cong"); }

} public void disconnect() {

if(con != null) { try {

con.close(); } catch (Exception e) {

// TODO: handle exception e.printStackTrace(); }

} }

public static Connection getConnection() { return con; }

Trang 20

public class ConnectDB {

public static Connection con = null; private static ConnectDB instance = new ConnectDB(); public static ConnectDB getInstance() {

return instance; }

public void connect() throws SQLException {

String url = "jdbc:sqlserver://localhost:1433;database name=QLNVIEN"; String user = "sa"; String pw = "123"; con = DriverManager.getConnection(url, user, pw); if(con != null) {

System.out.println("thanh cong"); }

} public void disconnect() {

if(con != null) { try {

con.close(); } catch (Exception e) {

// TODO: handle exception e.printStackTrace(); }

} }

public static Connection getConnection() { return con; }

Trang 21

package connectDB; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; public class ConnectDB {

public static Connection con = null; private static ConnectDB instance = new ConnectDB(); public static ConnectDB getInstance() {

return instance; }

public void connect() throws SQLException {

String url = "jdbc:sqlserver://localhost:1433;database name=QLNVIEN"; String user = "sa"; String pw = "123"; con = DriverManager.getConnection(url, user, pw); if(con != null) {

System.out.println("thanh cong"); }

}

public void disconnect() { if(con != null) { try {

con.close(); } catch (Exception e) {

// TODO: handle exception e.printStackTrace(); }

} }

public static Connection getConnection() { return con; }

Trang 22

public class ConnectDB {

public static Connection con = null; private static ConnectDB instance = new ConnectDB(); public static ConnectDB getInstance() {

return instance; }

public void connect() throws SQLException {

String url = "jdbc:sqlserver://localhost:1433;database name=QLNVIEN"; String user = "sa"; String pw = "123"; con = DriverManager.getConnection(url, user, pw); if(con != null) {

System.out.println("thanh cong"); }

} public void disconnect() {

if(con != null) { try {

con.close(); } catch (Exception e) {

// TODO: handle exception e.printStackTrace(); }

} }

public static Connection getConnection() { return con; }

Trang 23

package connectDB; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; public class ConnectDB {

public static Connection con = null; private static ConnectDB instance = new ConnectDB(); public static ConnectDB getInstance() {

return instance; }

public void connect() throws SQLException {

String url = "jdbc:sqlserver://localhost:1433;database name=QLNVIEN"; String user = "sa"; String pw = "123"; con = DriverManager.getConnection(url, user, pw); if(con != null) {

System.out.println("thanh cong"); }

} public void disconnect() {

if(con != null) { try {

con.close(); } catch (Exception e) {

// TODO: handle exception e.printStackTrace(); }

} }

public static Connection getConnection() { return con; }

Trang 24

public class ConnectDB {

public static Connection con = null; private static ConnectDB instance = new ConnectDB(); public static ConnectDB getInstance() {

return instance; }

public void connect() throws SQLException {

String url = "jdbc:sqlserver://localhost:1433;database name=QLNVIEN"; String user = "sa"; String pw = "123"; con = DriverManager.getConnection(url, user, pw); if(con != null) {

System.out.println("thanh cong"); }

} public void disconnect() {

if(con != null) { try {

con.close(); } catch (Exception e) {

// TODO: handle exception e.printStackTrace(); }

} }

public static Connection getConnection() { return con; }

Trang 25

package connectDB; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; public class ConnectDB {

public static Connection con = null; private static ConnectDB instance = new ConnectDB(); public static ConnectDB getInstance() {

return instance; }

public void connect() throws SQLException {

String url = "jdbc:sqlserver://localhost:1433;database name=QLNVIEN"; String user = "sa"; String pw = "123"; con = DriverManager.getConnection(url, user, pw); if(con != null) {

System.out.println("thanh cong"); }

} public void disconnect() {

if(con != null) { try {

con.close(); } catch (Exception e) {

// TODO: handle exception e.printStackTrace(); }

} }

public static Connection getConnection() { return con; }

Trang 26

public class ConnectDB {

public static Connection con = null; private static ConnectDB instance = new ConnectDB(); public static ConnectDB getInstance() {

return instance; }

public void connect() throws SQLException {

String url = "jdbc:sqlserver://localhost:1433;database name=QLNVIEN"; String user = "sa"; String pw = "123"; con = DriverManager.getConnection(url, user, pw); if(con != null) {

System.out.println("thanh cong"); }

} public void disconnect() {

if(con != null) { try {

con.close(); } catch (Exception e) {

// TODO: handle exception e.printStackTrace(); }

} }

public static Connection getConnection() { return con; }

Trang 27

package connectDB; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; public class ConnectDB {

public static Connection con = null; private static ConnectDB instance = new ConnectDB(); public static ConnectDB getInstance() {

return instance; }

public void connect() throws SQLException {

String url = "jdbc:sqlserver://localhost:1433;database name=QLNVIEN"; String user = "sa"; String pw = "123"; con = DriverManager.getConnection(url, user, pw); if(con != null) {

System.out.println("thanh cong"); }

}

public void disconnect() { if(con != null) { try {

con.close(); } catch (Exception e) {

// TODO: handle exception e.printStackTrace(); }

} }

public static Connection getConnection() { return con; }

Trang 28

public class ConnectDB {

public static Connection con = null; private static ConnectDB instance = new ConnectDB(); public static ConnectDB getInstance() {

return instance; }

public void connect() throws SQLException {

String url = "jdbc:sqlserver://localhost:1433;database name=QLNVIEN"; String user = "sa"; String pw = "123"; con = DriverManager.getConnection(url, user, pw); if(con != null) {

System.out.println("thanh cong"); }

} public void disconnect() {

if(con != null) { try {

con.close(); } catch (Exception e) {

// TODO: handle exception e.printStackTrace(); }

} }

public static Connection getConnection() { return con; }

Trang 29

package connectDB; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; public class ConnectDB {

public static Connection con = null; private static ConnectDB instance = new ConnectDB(); public static ConnectDB getInstance() {

return instance; }

public void connect() throws SQLException {

String url = "jdbc:sqlserver://localhost:1433;database name=QLNVIEN"; String user = "sa"; String pw = "123"; con = DriverManager.getConnection(url, user, pw); if(con != null) {

System.out.println("thanh cong"); }

} public void disconnect() {

if(con != null) { try {

con.close(); } catch (Exception e) {

// TODO: handle exception e.printStackTrace(); }

} }

public static Connection getConnection() { return con; }

Trang 30

public class ConnectDB {

public static Connection con = null; private static ConnectDB instance = new ConnectDB(); public static ConnectDB getInstance() {

return instance; }

public void connect() throws SQLException {

String url = "jdbc:sqlserver://localhost:1433;database name=QLNVIEN"; String user = "sa"; String pw = "123"; con = DriverManager.getConnection(url, user, pw); if(con != null) {

System.out.println("thanh cong"); }

}

public void disconnect() { if(con != null) { try {

con.close(); } catch (Exception e) {

// TODO: handle exception e.printStackTrace(); }

} }

public static Connection getConnection() { return con; }

Trang 31

package connectDB; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; public class ConnectDB {

public static Connection con = null; private static ConnectDB instance = new ConnectDB(); public static ConnectDB getInstance() { return instance; }

public void connect() throws SQLException {

String url = "jdbc:sqlserver://localhost:1433;database name=QLNVIEN"; String user = "sa"; String pw = "123"; con = DriverManager.getConnection(url, user, pw); if(con != null) {

System.out.println("thanh cong"); }

} public void disconnect() {

if(con != null) { try {

con.close(); } catch (Exception e) {

// TODO: handle exception e.printStackTrace(); }

} }

public static Connection getConnection() { return con; }

Trang 32

public class ConnectDB {

public static Connection con = null; private static ConnectDB instance = new ConnectDB(); public static ConnectDB getInstance() {

return instance; }

public void connect() throws SQLException {

String url = "jdbc:sqlserver://localhost:1433;database name=QLNVIEN"; String user = "sa"; String pw = "123"; con = DriverManager.getConnection(url, user, pw); if(con != null) {

System.out.println("thanh cong"); }

} public void disconnect() {

if(con != null) { try {

con.close(); } catch (Exception e) {

// TODO: handle exception e.printStackTrace(); }

} }

public static Connection getConnection() { return con; }

Trang 33

package connectDB; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; public class ConnectDB {

public static Connection con = null; private static ConnectDB instance = new ConnectDB(); public static ConnectDB getInstance() {

return instance; }

public void connect() throws SQLException {

String url = "jdbc:sqlserver://localhost:1433;database name=QLNVIEN"; String user = "sa"; String pw = "123"; con = DriverManager.getConnection(url, user, pw); if(con != null) {

System.out.println("thanh cong"); }

} public void disconnect() {

if(con != null) { try {

con.close(); } catch (Exception e) {

// TODO: handle exception e.printStackTrace(); }

} }

public static Connection getConnection() { return con; }

Trang 34

public class ConnectDB {

public static Connection con = null; private static ConnectDB instance = new ConnectDB(); public static ConnectDB getInstance() { return instance; }

public void connect() throws SQLException {

String url = "jdbc:sqlserver://localhost:1433;database name=QLNVIEN"; String user = "sa"; String pw = "123"; con = DriverManager.getConnection(url, user, pw); if(con != null) {

System.out.println("thanh cong"); }

} public void disconnect() {

if(con != null) { try {

con.close(); } catch (Exception e) {

// TODO: handle exception e.printStackTrace(); }

} }

public static Connection getConnection() { return con; }

Trang 35

package connectDB; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; public class ConnectDB {

public static Connection con = null; private static ConnectDB instance = new ConnectDB(); public static ConnectDB getInstance() { return instance; }

public void connect() throws SQLException {

String url = "jdbc:sqlserver://localhost:1433;database name=QLNVIEN"; String user = "sa"; String pw = "123"; con = DriverManager.getConnection(url, user, pw); if(con != null) {

System.out.println("thanh cong"); }

} public void disconnect() {

if(con != null) { try {

con.close(); } catch (Exception e) {

// TODO: handle exception e.printStackTrace(); }

} }

public static Connection getConnection() { return con; }

Trang 36

public class ConnectDB {

public static Connection con = null; private static ConnectDB instance = new ConnectDB(); public static ConnectDB getInstance() { return instance; }

public void connect() throws SQLException {

String url = "jdbc:sqlserver://localhost:1433;database name=QLNVIEN"; String user = "sa"; String pw = "123"; con = DriverManager.getConnection(url, user, pw); if(con != null) {

System.out.println("thanh cong"); }

} public void disconnect() {

if(con != null) { try {

con.close(); } catch (Exception e) {

// TODO: handle exception e.printStackTrace(); }

} }

public static Connection getConnection() { return con; }

Trang 37

package connectDB; import java.sql.Connection;

import java.sql.DriverManager;

import java.sql.SQLException;

public class ConnectDB {

public static Connection con = null;

private static ConnectDB instance = new ConnectDB();

public static ConnectDB getInstance() {

return instance;

}

public void connect() throws SQLException {

String url = "jdbc:sqlserver://localhost:1433;databasename=Q

LNVIEN";

String user = "sa";

String pw = "123";

con = DriverManager.getConnection(url, user, pw);

if(con != null) {

System.out.println("thanh cong");

}

}

public void disconnect() {

if(con != null) {

try {

con.close();

} catch (Exception e) {

// TODO: handle exception

e.printStackTrace();

}

}

}

public static Connection getConnection() {

return con;

}

Trang 38

public class ConnectDB {

public static Connection con = null; private static ConnectDB instance = new ConnectDB(); public static ConnectDB getInstance() {

return instance; }

public void connect() throws SQLException {

String url = "jdbc:sqlserver://localhost:1433;database name=QLNVIEN"; String user = "sa"; String pw = "123"; con = DriverManager.getConnection(url, user, pw); if(con != null) {

System.out.println("thanh cong"); }

} public void disconnect() {

if(con != null) { try {

con.close(); } catch (Exception e) {

// TODO: handle exception e.printStackTrace(); }

} }

public static Connection getConnection() { return con; }

Trang 39

package connectDB;

import java.sql.Connection;

import java.sql.DriverManager;

import java.sql.SQLException;

public class ConnectDB {

public static Connection con = null;

private static ConnectDB instance = new ConnectDB();

public static ConnectDB getInstance() {

return instance;

}

public void connect() throws SQLException {

String url = "jdbc:sqlserver://localhost:1433;databasename=Q

LNVIEN";

String user = "sa";

String pw = "123";

con = DriverManager.getConnection(url, user, pw);

if(con != null) {

System.out.println("thanh cong");

}

}

public void disconnect() {

if(con != null) {

try {

con.close();

} catch (Exception e) {

// TODO: handle exception

e.printStackTrace();

}

}

}

public static Connection getConnection() {

return con;

}

Trang 40

public class ConnectDB {

public static Connection con = null; private static ConnectDB instance = new ConnectDB(); public static ConnectDB getInstance() { return instance; }

public void connect() throws SQLException {

String url = "jdbc:sqlserver://localhost:1433;database name=QLNVIEN"; String user = "sa"; String pw = "123"; con = DriverManager.getConnection(url, user, pw); if(con != null) {

System.out.println("thanh cong"); }

} public void disconnect() {

if(con != null) { try {

con.close(); } catch (Exception e) {

// TODO: handle exception e.printStackTrace(); }

} }

public static Connection getConnection() { return con; }

Ngày đăng: 11/07/2023, 00:16

TỪ KHÓA LIÊN QUAN

TÀI LIỆU CÙNG NGƯỜI DÙNG

  • Đang cập nhật ...

TÀI LIỆU LIÊN QUAN