⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 logincheck.java

📁 酒店管理asp的源代码和各种文档说明,很齐全的,只要你解压后就能运行程序.
💻 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 + -