public static int insertMstxAdsImage(File fileName, int gid) {
		int result = 0;
		Connection con = DBUtil.getConnection();
		PreparedStatement pstmt = null;
		FileInputStream fis = null;
		int id = getMaxNumber("mstx_ads_image");
		updateMaxNumber(6);// 将该字段值加1
		try {
			fis = new FileInputStream(fileName);
			pstmt = con.prepareStatement("insert into mstx_ads_image(gpid,gid,gdata) values(?,?,?)");
			pstmt.setInt(1, id);
			pstmt.setInt(2, gid);
			pstmt.setBinaryStream(3, fis, (int) fileName.length());
			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;
	}