📄 th_init_unit_sql.java
字号:
package swing;
import com.bwm.string.Str;
import com.zh.conpool.*;
import java.sql.Connection;
import java.sql.ResultSet;
public class th_init_unit_sql{
private String sql="";
private ResultSet rs=null;
private int del=0;
private String delid="";
Condata con=new Condata();
Connection conn=null;
Str str=new Str();
public ResultSet toRs(){
sql="select * from tb_th_unit";
try{
con.getConnection();
rs=con.executeQuery(sql);
}catch(Exception eee){
System.out.println(eee.getMessage());
}
return rs;
}
public int toDel(String id){
this.delid=id;
try{
sql="delete from tb_th_unit 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 + -