Upgrading wiring in older homes usually includes replacing old two-wire, non-grounding type receptacles. Replacing a two-wire receptacle with a grounding-type receptacle and not providing an equipment ground or GFCI protection is a serious NEC violation. Extending a two-wire circuit without an equipment ground is also prohibited, even if protected by a GFCI type receptacle.
Refer to the illustrations and to Code sections 250.130(C) and 406.4(D) for the right way to do it.
A non-grounding type receptacle can be replaced with a grounding-type receptacle if an equipment grounding conductor is installed and connected to any accessible point on the grounding electrode system.A non-grounding type receptacle can be replaced with a grounding-type receptacle if an equipment grounding conductor is installed and connected to any accessible point on the grounding electrode conductor.A non-grounding type receptacle can be replaced with a grounding-type receptacle if an equipment grounding conductor is installed and connected to the equipment ground terminal bar within the enclosure where the branch circuit originates.A non-grounding type receptacle can be replaced with a grounding-type receptacle if an equipment grounding conductor is installed and connected to an equipment grounding conductor that is part of another branch circuit originating in the same enclosure.(a) A non-grounding type receptacle can be replaced with another non-grounding type receptacle.A non-grounding receptacle can be replaced with a GFCI type receptacle. The receptacle shall be marked "No Equipment Ground". An equipment grounding conductor shall not be connected from the GFCI type receptacle to any outlet supplied from the GFCI receptacle.A non-grounding receptacle can be replaced with a grounding type where supplied through a GFCI.