📄 bacteriacommon.java
字号:
package yd.pethospital.bacteriaregister.jdbc;
import java.sql.*;
import java.util.Vector;
import yd.pethospital.share.SystemShare;
public class BacteriaCommon {
public Vector Vc,VRowData; //获取字段向量 列向量
public BacteriaCommon(){
try {
SystemShare.SQL="select * from BacterinInfo inner join BacterinType on BacterinInfo.bacterintype=BacterinType.bacterintype";
SystemShare.getConnection();
SystemShare.rs=SystemShare.pst.executeQuery();
VRowData=new Vector();
while(SystemShare.rs.next()){
Vc=new Vector(); //构造空向量
Vc.addElement(SystemShare.rs.getString(1)); //项量获得信息表的第一字段
Vc.addElement(SystemShare.rs.getString(2)); //信息表第二字段
Vc.addElement(SystemShare.rs.getString(3)); //信息表第三字段
Vc.addElement(SystemShare.rs.getString(4)); //信息表第四字段
VRowData.addElement(Vc);
}
SystemShare.rs.close();
}catch (SQLException e) {
e.printStackTrace();
}
SystemShare.close();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -