When a water-bearing formation is encountered in the drilling of any borehole for natural gas or oil, casing shall be set upon the next formation encountered which is of such a nature that it will sustain the casing and exclude all water from the lower borehole.