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

📄 dvision.java

📁 个人办公平台,用JAVA开发的TOMCAT的服务器
💻 JAVA
字号:
/*
 * Created on 2006-9-24
 *
 * To change the template for this generated file go to
 * Window>Preferences>Java>Code Generation>Code and Comments
 */
package com.skyhawk.hellen;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;

import com.skyhawk.db.ConnectionFactory;

/**
 * @author Administrator
 *
 * To change the template for this generated type comment go to
 * Window>Preferences>Java>Code Generation>Code and Comments
 */
public class Dvision {
	public ArrayList dvision(String pw){
	
			ConnectionFactory connection=null;
			Connection conn=null;
			connection=new ConnectionFactory();
			conn=ConnectionFactory.getConnection();
			Statement stm=null;
			ResultSet rs=null;
			ArrayList list=null;
			try {
				stm=conn.createStatement();
			} catch (SQLException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
			try {
				rs=stm.executeQuery("select title from O_message where empid='"+pw+"'");
			} catch (SQLException e1) {
				// TODO Auto-generated catch block
				e1.printStackTrace();
			}
			try {
				while(rs.next()){
					String id=null;
					id=rs.getString("empid");
					list.add(id);
					rs.next();
					
				}
			} catch (SQLException e2) {
				// TODO Auto-generated catch block
				e2.printStackTrace();
			}
			return list;
			
	}

	public static void main(String[] args) {
	}
}

⌨️ 快捷键说明

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