The subject-matter of the first action related to the liability of the defendants to return the same bonds which they had borrowed of the plaintiff. That in the present action involves their liability to pay the plaintiff the proceeds of the bonds which arose upon a sale thereof with the plaintiff’s assent. The claims are essentially different. The judgment in the former action was not an estoppel. A judgment, upon demurrer by the defendant, is conclusive only as to the questions upon which the right of the plaintiff to recover is found to depend, and upon the determination of which, as shown by the record, the judgment was in reality founded. In Dutchess of Kingston’s case, 1 Leach’s 0. 0. 146, a judgment was said not to be “ evidence of any matter to be inferred by argument from the judgment.” The authority of this rule is universally recognized. It is very true that it can make no difference, in principle, how the facts upon which the former adjudication rests were proved, whether by the admission which the law implies from a demurrer, or by the testimony of witnesses. But however* proved, they must, in order to have the effect of an estoppel, establish the same right or defense which is in controversy in the second action. 2 Smith’s Lead. Cas. note to Dutchess of Kingston’s case; Burnell v. Knight, 51 Barb. 267; Goodale v. Tuttle, 29 N. Y. 459. The court decided nothing in the former action with regard to the merits of the controversy between these parties. All that was decided was that the complaint set forth no cause of action of any kind, and that the plaintiff should pay the defendant costs. The complaint in the present action does set forth a good cause of action. It does not, therefore, stand to reason that the former action can be a bar, and so are the authorities. In Viner’s Abridgment (q* 4), it is stated that it was said by Worth, Ch. J., that if a man mistakes his declaration, and the defendant demurs, there is no question but that the plaintiff may set it right in a second action, and that if plaintiff demur to the plea in bar, then by his demurrer he confesses the fact, if well pleaded, and this estops him as much as a verdict would; but if the plea were not good, then there is no estoppel, and the court must talce notice of the defendant’s plea, for upon the matter as that falls out to be good or not the second action will be maintainable or not; to which all the justices agreed. Lampen v. Kedgervin, 1 Mod. 207. Chitty says: “If the plaintiff, by mistake, bring trespass instead of trover, and judgment be given against him on that account, the defendant cannot plead it in bar *377to an action of trover brought afterward against him; and if the plaintiff mistake his cause of action and the defendant demur, the plaintiff certainly is not precluded from commencing a fresh action, and may reply to a plea in bar of the judgment on demurrer that the same was not obtained on the merits.” 1 Chit. Pl. 227. In Gilman v. Rives, 10 Pet. 301, the supreme court of the United States held, that “a judgment that a declaration is bad in substance can never be pleaded as a bar to a good declaration for the same cause of action;” and the reason given is, that “the judgment is in no just sense a judgment upon the merits.” The same doctrine was held by the supreme court of Massachusetts, in Wilbur v. Gilmore, 21 Pick. 253, and in the note of the American edition to 2 Smith’s Leading Gases (6th Am. ed.), 808. Many of the authorities on this subject are collected, and as the result of them, it is stated that “it is well settled that the estoppel of an adjudication, made on grounds purely technical, and under such circumstances that the merits could not come in question, will be limited to the point actually decided, and will, therefore, not be a bar to a subsequent action, brought in a way to avoid the objection which proved fatal in the first. See, also, 1 Greenl. Ev., § 530. We have looked into the. cases cited on behalf of the appellant, but have found nothing in them in conflict with these authorities. In each of them, judgments were given in the former action on the merits. In Bouchau v. Dias, 3 Den. 238, the defendant pleaded a release, and the case turned on the legal effect of it. So in Vanlandingham v. Ryan, 17 Ill. 25 ; Perkins v. Moore, 16 Ala. 17, and Robinson v. Howard, 5 Cal. 428, the pleading demurred to presented all the facts on which the rights of the parties depended. That is not the case here.
The judgment must be affirmed, with costs.
Judgment affirmed.