?? logincheck.java
字號:
import java.sql.*;
public class LoginCheck{
Connection con = null;
Statement stmt = null;
ResultSet loginRs = null;
public void InitCheck( Connection con )
{
if ( this.con != con )
{
this.con = con;
}
try
{
stmt = con.createStatement();
String strSQL = "select * from operator";
loginRs = stmt.executeQuery( strSQL );
}
catch ( SQLException sex )
{
System.out.println( sex.toString() );
}
}
public boolean next()
{
boolean result = false;
try
{
result = loginRs.next();
}
catch ( SQLException sex )
{
System.out.println( sex.toString() );
}
return result;
}
public String getName(){
String result = null;
try{
result = loginRs.getString("name");
}catch(SQLException id){
System.out.println( id.toString() );
}
return result;
}
public String getPassWord(){
String result = null;
try{
result = loginRs.getString("password");
}catch(SQLException id){
System.out.println( id.toString() );
}
return result;
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -