The hole-density dependence of the normal-state resistivity and transition temperature T(c) of YBa2Cu3O7-x was studied using the electric field effect in ultrathin films of 1 to 8 unit cells thickness. The change in resistivity was found to bc equal to the field-induced variation in the areal carrier density, leading to a relation that the conductivity is proportional to the hole density. A similar linear dependence was also found in T(c). However, a saturation occurred in both cases but at different hole densities. The result reveals different effects of hole filling in influencing normal-state and superconducting transport of YBa2Cu3O7-x.