logincheck.java
来自「酒店管理asp的源代码和各种文档说明,很齐全的,只要你解压后就能运行程序.」· Java 代码 · 共 73 行
JAVA
73 行
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 + =
减小字号Ctrl + -
显示快捷键?