public static int insertMstxImage(int mid, File fileName, Date imageTime) {
		int result = 0;
		int id = MstxDao.getMaxNumber("mstx_image");
		MstxDao.updateMaxNumber(4);// 将该字段值加1
		FileInputStream fis = null;
		Connection con = DBUtil.getConnection();
		PreparedStatement pstmt = null;
		try {
			fis = new FileInputStream(fileName);
			pstmt = con.prepareStatement("insert into mstx_image(id,mid,image_data,image_time) values(?,?,?,?)");
			pstmt.setInt(1, id);
			pstmt.setInt(2, mid);
			pstmt.setBinaryStream(3, fis, fis.available());
			pstmt.setDate(4, imageTime);
			result = pstmt.executeUpdate();
		} catch (Exception e) {
			e.printStackTrace();
		} finally {
			try {
				if (fis != null) {
					fis.close();
					fis = null;
				}
			} catch (Exception e) {
				e.printStackTrace();
			}
			try {
				if (pstmt != null) {
					pstmt.close();
					pstmt = null;
				}
			} catch (Exception e) {
				e.printStackTrace();
			}
			try {
				if (con != null) {
					con.close();
					con = null;
				}
			} catch (Exception e) {
				e.printStackTrace();
			}
		}
		return result;
	}