
277 S.E.2d 228 (1981)
TED LANSING SUPPLY COMPANY, INC.
v.
ROYAL ALUMINUM AND CONSTRUCTION CORPORATION.
Record No. 790596.
Supreme Court of Virginia.
April 24, 1981.
*229 Daniel S. Brown, Roanoke (Hazlegrove, Dickinson & Rea, Roanoke, on brief), for appellant.
Fergus B. Norton, Roanoke, on brief, for appellee.
Before CARRICO, C. J., and HARRISON, COCHRAN, POFF, COMPTON, THOMPSON and STEPHENSON, JJ.
STEPHENSON, Justice.
Ted Lansing Supply Company, Inc., (Lansing) appeals a judgment of the trial court approving a jury verdict in the amount of $25,000.00, returned in favor of Royal Aluminum and Construction Corporation (Royal) on its counterclaim against Lansing.
The dispositive issue on this appeal is whether the trial court erred in submitting to the jury the issue of Lansing's liability upon a theory of breach of implied warranty when this theory was not raised by the pleadings.
Lansing is a distributor of certain "replacement windows" manufactured by Replacement Products Industries Corporation. Royal purchased a quantity of these windows from Lansing and installed them in houses of its customers. Subsequently, Royal began receiving complaints from its customers that the windows were drafty and that moisture formed between the panes of the windows.
Lansing initiated these proceedings by filing two motions for judgment against Royal for debts due on account. (These claims were decided in favor of Lansing and are not in issue here.) Royal counterclaimed, alleging it suffered damage as the result of Lansing's breach of its warranty that the windows were "Draft Free" and "Condensation Free".
Lansing's account claims and Royal's counterclaim for breach of warranty were tried before a jury. At the close of Royal's case in chief on the counterclaim, Lansing moved the court to strike Royal's evidence and enter summary judgment for Lansing on the grounds that Royal had failed to prove the existence or breach of any express warranty, and that Royal had failed to prove damages resulting from any breach of warranty. The trial court did not expressly rule on the motion, but, sua sponte, and over Lansing's objection, interjected an implied warranty of fitness theory of recovery. At the conclusion of all the evidence, Lansing renewed its motion to strike Royal's evidence, and the trial court sustained the motion as it pertained to express warranty[1] but overruled it insofar as an implied warranty theory was concerned. The case was submitted to the jury on the theory of an implied warranty and a verdict was returned on the counterclaim in favor of Royal in the amount of $25,000.00. Lansing's motion to set aside the verdict and to enter final judgment in its favor was overruled by the trial court, and this appeal ensued.
An examination of Royal's counterclaim shows that it alleged the breach of an express warranty[2] and that it contains no allegation of the existence or breach of an implied warranty.
It is firmly established that no court can base its judgment or decree upon facts not alleged or upon a right which has not been pleaded and claimed. Potts v. Mathieson Alkali Works, 165 Va. 196, 207, 181 S.E. 521, 525 (1935). "Pleadings are as essential as proof, and no relief should be granted that does not substantially accord with the case as made in the pleading." Bank of *230 Giles County v. Mason, 199 Va. 176, 180, 98 S.E.2d 905, 907 (1957); see also, Lee v. Lambert, 200 Va. 799, 802, 108 S.E.2d 356, 358 (1959). This rule is clearly stated in Potts as follows:
The basis of every right of recovery under our system of jurisprudence is a pleading setting forth facts warranting the granting of the relief sought. It is the sine qua non of every judgment or decree. No court can base its decree upon facts not alleged, nor render its judgment upon a right, however meritorious, which has not been pleaded and claimed.... Pleadings are as essential as proof, the one being unavailing without the other. A decree cannot be entered in the absence of pleadings upon which to found the same, and if so entered it is void.... Every litigant is entitled to be told by his adversary in plain and explicit language what is his ground of complaint or defense.... The issues in a case are made by the pleadings, and not by the testimony of witnesses or other evidence.
165 Va. at 207, 181 S.E. at 525.
In Bolling v. Acceptance Corporation, 204 Va. 4, 9, 129 S.E.2d 54, 57 (1963), and Marshall v. Oldsmobile Company, 207 Va. 972, 975, 154 S.E.2d 140, 143 (1967), we clearly recognized the distinction between an action for breach of express warranty and one for breach of an implied warranty. This distinction is also recognized in the Uniform Commercial Code. See Code §§ 8.2-313 to 317.
In the Bolling case, the Bollings sought to show the existence and breach of an implied warranty, although their pleadings alleged a claim based only on an express oral warranty. In rejecting the Bollings' contention, we said:
The Bollings' pleadings did not mention implied warranty but, to the contrary, set forth that an express oral warranty was made to them prior to the purchase of the truck and the execution of the contract.
The Bollings represented to the chancellor, during argument concerning the questioned testimony, that they wished to prove the existence and breach of an implied warranty, and that the testimony was admissible for this purpose. This position was taken in the face of the allegation in their pleadings that they relied solely upon the breach of an express oral warranty. Thus, they were attempting to prove a case different from that made out in their pleadings. The function of pleading is to inform the opposing party of the nature of the case to be made against him. That purpose would be defeated if it were permissible to allege one case and prove another.
204 Va. at 9, 129 S.E.2d at 57-58.
In the present case, Royal's claim for damages was based on the theory that Lansing expressly warranted that the windows were "Draft Free" and "Condensation Free" and that it breached that warranty. Royal did not allege the existence or breach of an implied warranty of fitness or merchantability. We are of opinion that the court erred in submitting Royal's case to the jury on an implied warranty theory of recovery not raised by the counterclaim.
Accordingly, the judgment appealed from will be reversed, and final judgment entered for Lansing on Royal's counterclaim.
Reversed and final judgment.
NOTES
[1]  No cross-error having been assigned by Royal to this ruling, it has become final. Rule 5:27.
[2]  The counterclaim reads in pertinent part as follows:

3. That the windows sold to Royal by Lansing as seller were warrented [sic] and represented to be "Draft Free" and "Condensation Free".
4. That the windows sold to Royal, by seller, Lansing, contrary to their warrenty [sic], were not draft free and the windows allowed moisture to condense on the inside of the windows, creating a condensation problem inside the homes in which they were installed by Royal.
