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

📄 init_out_out_sql.java

📁 改代码是采用JSP实现的在线办公自动化管理系统
💻 JAVA
字号:
package swing;

import com.bwm.string.Str;
import com.zh.conpool.*;
import java.sql.Connection;
import java.sql.ResultSet;

public class Init_out_out_sql{
	
	private String sql="";
	private ResultSet rs=null;
	private int del=0;
	private String delid="";
	private String edit="";
	private String[] rest=new String[3]; 
	private String like="";
	
	Condata con=new Condata();
	Connection conn=null;
	Str str=new Str();
	
	public ResultSet toRs(String sqls){
		this.sql=sqls;
		try{
			con.getConnection();
			rs=con.executeQuery(sql);
		}catch(Exception eee){
			System.out.println(eee.getMessage());
		}
		return rs;
	}
	
	public String[] toEdit(String edit){
		this.edit=edit;
		try{
			sql="select * from tb_th_plan where ID='"+edit+"'";
			con.getConnection();
			rs=con.executeQuery(sql);
			if(rs.next()){
				rest[0]=rs.getString(2);
				rest[1]=rs.getString(3);
				rest[2]=rs.getString(5);
			}
		}catch(Exception eee){
			System.out.println(eee.getMessage());
		}
		return rest;
	}
	
	public int toDel(String id){
		this.delid=id;
		try{	
			sql="delete from tb_th_plan where ID='"+delid+"'";
			con.getConnection();
			del=con.executeUpdate(sql);
		}catch(Exception eee){
			System.out.println(eee.getMessage());
		}
		return del;
	}
	
	public void close(){
		try{
			conn=null;
		}catch(Exception e){
			System.out.print("f1");
		}
		try{
			con.close();
			con=null;
		}catch(Exception ee){
			System.out.print("f");
		}
	}
}

⌨️ 快捷键说明

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