private static int runStatementGetID(String statement)
    {
        try
        {
            getConnection();
            Statement st = con.createStatement();
            int numofkey = st.executeUpdate(statement, Statement.RETURN_GENERATED_KEYS);
            ResultSet keys = st.getGeneratedKeys();
            int key = 0;
            if (keys.next()) {
            key = keys.getInt(1);
            }       
            return key;
        }
        catch (SQLException ex)
        {
            
            return 0;
        }
    }