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

📄 operatedbbook.java

📁 用最近的dojo1.2.1制作前端的ajax购书网站
💻 JAVA
字号:
package server.books;
import java.sql.*;
import server.database.*;

/**
 * @author user
 *
 * To change this generated comment edit the template variable "typecomment":
 * Window>Preferences>Java>Templates.
 * To enable and disable the creation of type comments go to
 * Window>Preferences>Java>Code Generation.
 */
public class operateDbBook 
{
	//searchData dt=new searchData();
	ResultSet rs=null; 
 	ResultSet rs_temp=null;
    Operation op=new Operation();


	int CalSize(String sql)
	throws SQLException,InstantiationException,IllegalAccessException,ClassNotFoundException
	
	{	 ResultSet rs_temp=null;
		int size=0;
			int wholePage=0;
			if(rs_temp==null)
			rs_temp=op.select(sql);
			
			while(rs_temp.next())
		{
			size++;
		}
		
    rs_temp.close();
			return size;
		
	}
	
	
	void moveRS(int t)
	throws SQLException,InstantiationException,IllegalAccessException,ClassNotFoundException
	
	{
		t=(t-1)*searchData.getContent();
		while(t>0&&rs.next())
		{
			t--;
		}
	}
	
	/**
	 * Returns the rs.
	 * @return ResultSet
	 */
	ResultSet getRs(String sql,int instantpage) 
	throws SQLException,InstantiationException,IllegalAccessException,ClassNotFoundException
	{
		rs=op.select(sql);
		moveRS(instantpage);
		
		
		
		return rs;
	}

	/**
	 * Sets the rs.
	 * @param rs The rs to set
	 */
	public void setRs(ResultSet rs) {
		this.rs = rs;
	}

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -