这个程序是花了好几十万请人开发的

源代码在线查看: fbplrs.java

软件大小: 1018 K
上传用户: wy50094777
关键词: 程序
下载地址: 免注册下载 普通下载 VIP

相关代码

				
				package javabean;
				
				import java.util.Vector;
				import java.sql.*;
				
				public class FbplRs 
				{
				
					private Statement stmt=null;
					private ResultSet rs=null;
					private Connection con=null;
						
					private ConnectionPool pool;
					
					public FbplRs(){
						pool=ConnectionPool.getInstance();               //初始化连接池
					}
							
					public Vector getTitleId(String sql,int numPages,int currentPage) throws SQLException
					{
					  
					  int count=numPages;
					    
					  Vector vec=new Vector();
					  try 
					  {	    
					  
					  con=pool.getConnection();
					  stmt=con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_READ_ONLY);
					  rs=stmt.executeQuery(sql);
					  rs.absolute(numPages*(currentPage-1)+1);
					  
					  while(count>0)
					  {
						  Commance show=new Commance();	  
						  show.setUid(rs.getString("UUID"));
						  show.setDate(rs.getString("PUBDATE"));
						  show.setContent(rs.getString("CONTENT"));
						  show.setKind(rs.getString("KIND"));
						  vec.add(show);
						  if(!rs.next()) break;	
						  count--;
					   }
					   rs.close();
					  }  
					  catch (SQLException e) { return null;}	
					  
					  con.close();
					  return vec;	  
					}
				}			

相关资源