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

📄 petcommon.java

📁 宠物医院管理系统 包含宠物的注册 管理 收费 诊断等一系列过程控制 还包含配应的数据库 Jar包
💻 JAVA
字号:
package yd.pethospital.petregister.jdbc;

import java.sql.*;
import java.util.*;
import yd.pethospital.share.SystemShare;

public class PetCommon {
	
	public Vector Vc,VRowData;                             //获取字段向量 行向量
	 
	public PetCommon(){
		
		try {
			SystemShare.SQL="select * from PetInfo";
			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));                          //宠物信息表第四字段
				Vc.addElement(SystemShare.rs.getString(5));
				Vc.addElement(SystemShare.rs.getString(6));
				Vc.addElement(SystemShare.rs.getString(7));
				Vc.addElement(SystemShare.rs.getString(8));
				
				VRowData.addElement(Vc);                                 //将内容传到行向量
				
			}
			SystemShare.rs.close();
			
		} catch (SQLException e) {
			e.printStackTrace();
		}
		SystemShare.close();
	}
}

⌨️ 快捷键说明

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