?? check.java~1~
字號:
package com.jbaptech.accp.netbar.client;
import java.sql.*;
/**
* <p>Title: </p>
*
* <p>Description: </p>
*
* <p>Copyright: Copyright (c) 2005</p>
*
* <p>Company: 北京阿博泰克北大青鳥信息技術有限公司</p>
*
* @author Michael Luo
* @version 1.0
*/
public class Check {
public Check() {
}
public int checkUserName(String UserName){
try{
Connection con = ConnectionManager.getConnection();
String sql = "select * from Card where UserName ='"+UserName+"'";
Statement s = con.createStatement();
ResultSet rs = s.executeQuery(sql);
while(!rs.next()){
con.close();
return 0;
}
con.close();
}catch (SQLException ce){
ce.printStackTrace();
}
return 1;
}
public int checkPassword(String Password){
try{
Connection con = ConnectionManager.getConnection();
String sql = "select * from Card where Password ='"+Password+"'";
Statement s = con.createStatement();
ResultSet rs = s.executeQuery(sql);
while(!rs.next()){
con.close();
return 0;
}
con.close();
}catch (SQLException ce){
ce.printStackTrace();
}
return 1;
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -