private static void saveMenuItem(String string, int id, int i, int j) throws Exception {
        Connection conn;
        Statement stmt = null;
        ResultSet rs = null;
        int rc=-1;
        String cost="NORMAL";
        
        switch(i) {
        	case 0:
        		cost="NOCHARGE";
        		break;
        	case 1:
        		cost="PREMIUM";
        		break;
        }
        if(i==1 && string.endsWith("(+)"))
        	string=string.substring(0,string.length()-4);
        if(string.startsWith("    "))
        	string=string.trim();
        else
        	j=0;
    	conn=getDBConnection();
        stmt = conn.createStatement();
        //rs=stmt.executeQuery("SELECT reference_id from toc where reference_id=" + id + " AND type = " + j + " AND code = '" + cost + "' and title='" + string + "'");
        String q="INSERT into toc (reference_id,menu_id, type,cost,title,sort_order,active) VALUES (" + id + ",0," + j + ",'" + cost + "','" + string.replaceAll("'","''") + "',1,'Y')";
        System.out.println(q + ";");
        try {
            //if(!rs.next())
            	stmt.execute(q);
	        	if(stmt.getUpdateCount()==0) {
	        		System.err.println("DB Error");
	        	}
        } catch (Exception e) {
        	if(e.getMessage().startsWith("Duplicate")) {
        		System.err.println("Cannot insert: " + string);
        	}
        }
	    stmt.close();
	}