This action was brought to recover commissions, earned by plaintiff through services as a broker. The suit was commenced in Iving county, and the place of trial was afterwards changed to Whatcom county. At the time the complaint was filed, an affidavit and bond in attachment were also filed, the alleged ground for attachment being that the defendant was a nonresident of the state. At the same time an affidavit for a writ of garnishment was also filed, alleging that the Pacific Packing & Navigation Company, a corporation, controlled personal property belonging to the defendant. Writs of attachment and garnishment were issued and served.
Thereafter the defendant appeared, and applied to the court for an order directing the plaintiff to show causé why the attachment and garnishment should not be vacated, if the defendant should deposit in court stock of the garnishee company as security. Such an order to show cause was issued, and after a hearing the court denied the application to vacate. Poliowing the above events, the defendant filed in the cause a bond in the sum of $26,000, with the American Bonding & Trust Company of Baltimore City as surety. The bond was conditioned *485that the defendant should perform the judgment of the court in the cause. At this point in the history of the case, on May 14, 1902, the venue was changed to What-com county. In the following October, on motion of defendant, an order was entered declaring that the attachment and garnishment were thereby vacated, and also declaring that the surety upon the aforesaid bond given by defendant was released and discharged. The plaintiff attempted to prosecute an appeal to this court from said last named order, but the appeal was dismissed. Thereafter the cause was submitted to a jury for trial upon its merits, and a verdict was returned against the defendant in the sum of $3,450. Upon the return of the verdict, the clerk, under the terms of § 1, Laws 1903, p. 285, entered judgment. The judgment was entered against the defendant, and also the surety upon the aforesaid bond. Some time afterwards, the defendant moved to strike from the record of the judgment so much thereof as awarded recovery against the surety, which motion was granted. The plaintiff has appealed from the order of the court in modifying the judgment.
Respondent has moved to dismiss the appeal. The point is made that there was no service of the appeal notice upon the surety company. The notice was given in open court. By the terms of the statute, the surety company had appeared in the action, and was before the court. Bal. Code, §§ 5374, 5375. The surety company, therefore, had notice of the appeal. It is further urged, upon the motion to dismiss, that the order designated in the notice of appeal is not appealable. It was a final order made after judgment which affected a substantial right of appellant. Such an order is appealable, under Bal. Code, § 6500, subd. 7, The motion to dismiss the appeal is denied.
*486It is assigned by appellant that the court erred in making the order of October, 1902, purporting to discharge the attachment and release the surety, and it is argued by respondent that that order became res adjudicata as to the subject matter involved in this appeal. It will be remembered that an order had been previously entered denying the vacation of the attachment and garnishment. It is argued by appellant that the first order became res adjudicata, and that, in the absence of an appeal and reversal for error, it remained the law of the case. The first order was, however, based upon a mere application for the discharge of the attachment upon an order to show cause why it should not be done, if the respondent should deposit stock in court as security. ISTo other ground for the discharge of the attachment and garnishment appears to- have been raised at the time that order was made. Subsequently, however, affidavits were filed alleging that the respondent was a resident of AVhatcom county, in this state, at the time the attachment and garnishment were sued out. The affidavits appear to have been filed for the purpose of procuring a change of venue to AVhatcom county as the proper place for trial. The venue was changed for that reason, and, after the case reached said county, the court made the order of October, 1902, discharging the attachment and bond. The order was based upon the affidavits in the record that the respondent was a resident of this state, the only ground alleged for the attachment being that of nonresidence. The first order was therefore not res adjudicata, inasmuch as the subject then adjudicated was not that of residence, but the proposition to deposit stock as security in lieu of the attachment and garnishment.
It will also be remembered that an attempt was made to take an appeal from the order of October, 1902, which *487purported to discharge the attachment and bond. The dismissal of that appeal had the effect of an affirmance of the order. It therefore becomes necessary to determine what force should have been given to that order, at the time the one now appealed from was made. If there was nothing for the order of October, 1902, to act upon, then it was of no force, and its affirmance by the dismissal of the appeal gave it no more vitality than it already had. The respondent’s bond was filed in the cause months before that order was made. It was conditioned that the respondent would perform the judgment of the court, and, under the terms of Bah Code, § 5374, the attachment was thereby discharged. It follows that, when the order of October, 1902, was made, the attachment had long since been discharged by the giving of the respondent’s bond. The filing and approval of the bond ended the attachment, and there was no attachment pending before the court at the time the order was made upon which it could operate. It was, therefore, a nullity for want of subject-matter. The same was also true of that part of the order which purported to discharge the surety upon the bond. The motion of respondent sought the discharge of the surety solely as a consequence to follow from the discharge of the attachment. It is manifest that the court did not determine as to the surety’s liability upon any other theory. The motion asked for the order merely upon the ground that the attachment was wrongfully issued. The question of the surety’s liability without regard to the regularity of the attachment was not before the court. That question was therefore not adjudicated, and the order did not become res adjudieaia. It was so held in Wyman v. Hallock, 4 S. D. 469, 57 N. W. 197, a case involving all the essential features here discussed. The court in that ease said:
“If this undertaking became void and of no further effect upon the entry of such order, it was not because the *488order so said, but because such was the legal effect of discharging the attachment-. If the question of the further life or force of this undertaking was not before the judge, his expression of his opinion thereon, although in the order, was voluntary and obiter, and does not affect the parties or their rights; so that the question here presented is precisely the same as it would have been if the order had made no reference to the bond or undertaking and its cancellation.”
From the foregoing it follows that the order of October, 1902, did not adjudicate the surety’s unconditional contract liability under the terms of the bond, and the question now before us is, did the court err by striking from the judgment that portion thereof which awarded recovery against the surety? Our statute provides that the bond of the defendant in an attachment proceeding shall contain a promise to- perform the judgment of the court. The filing of the bond shall be deemed an appearance in the action, and, if judgment goes against the defendant, it shall also be entered against the’surety. Bal. Code, §§ 5374, 5375. It is almost universally held that, under such statutory provisions, the bond becomes an unconditional contract or promise to pay whatever judgment shall be rendered against the defendant upon the merits of the case, and that it does not depend upon the regularity of the attachment branch of the case. The theory of the statutes and decisions is that the consideration for the promise to pay the judgment, is the immediate release of the attached property. The giving of the bond effects the immediate discharge of the attachment and release of the property, and the bond then becomes a security for any judgment that shall be rendered against the defendant. The cases hold that, when such a bond has been given under a statute requiring an unconditional promise to perform the judgment of the court, the defendant is thereby estopped to *489raise any question as to the regularity of the attachment. Rachelman v. Skinner, 46 Minn. 196, 48 N. W. 776; Easton v. Ormsby, 18 R. I. 309, 27 Atl. 216; Paddock v. Matthews, 3 Mich. 18; Ferguson v. Gildewell, 48 Ark. 195, 2 S. W. 711; Gardner v. Donnelly, 86 Cal. 367, 24 Pac. 1072; Hazelrigg v. Donaldson, 2 Met. (Ky.) 445; Fox v. Mackenzie, 1 N. D. 298, 47 N. W. 386; McLaughlin v. Wheeler, 1 S. D. 497, 47 N. W. 816; Bunneman v. Wagner, 16 Or. 433, 18 Pac. 841, 8 Am. St. 306; Hill v. Harding, 93 Ill. 77; Kennedy v. Morrison, 31 Tex. 207.
• It is urged here that, under Bal. Code, § 5376, the defendant in attachment may raise the question of the irregularity of the attachment, even after giving the bond, as provided in § 5374. The latter section is, however, complete in itself as to the effect of giving the bond, and expressly states that “the attachment shall be discharged and restitution made of property taken or proceeds thereof.” It will be observed that the term “discharged” is used as referring to attachment, which must mean that the attachment then becomes a closed incident in the case. Section 5376 provides that, at any time before or after the “release” of the attached property, or before an actual levy has been made, application may be made that the writ be discharged on the ground that it was improperly issued. This section cannot be consistent with § 5374, if it is held that application may be made to discharge the writ of attachment after it has already been discharged by the giving of the bond. It must therefore refer to a “release” of the property, made voluntarily or otherwise, but without a discharge of the writ. In such case the writ would still be alive, and would require action on the part of the defendant to effect its discharge. But when the bond’ is given and approved, the writ is thereby discharged, and there is no longer any writ to which an application under ^ 5376 can be directed.
*490Therefore, under our law, a defendant in attachment has the option to first try the question of the regularity of the attachment, or to give the bond. If he elects to give the bond, which under our statute must provide for the perfoimance of the judgment of the court, he thereby gains the advantage of an immediate release of the property and discharge of the attachment. But, in lieu thereof, under the above authorities, the bond stands as security for any judgment that may thereafter be rendered against him in the action, and both he and his surety waive any right to attach the regularity of the attachment. Our attention has not been called to any case which holds to the contrary, when the bond contains the agreement to perform the judgment. It was so held in some of the above cited cases, where the bond was not in conformity with any statute, the liability being based upon the contract as a common law obligation. If the bond is- in some other form, such as a mere forthcoming bond conditioned to return the property in the event the attachment shall prevail, the obligation is different. But such bonds as our statute requires are held to amount to unconditional contracts to pay the judgment that shall be rendered against the defendant in the action.
It follows- that the surety upon the bond given in this case is liable upon the judgment rendered against the defendant, and that the court erred when it- struck from the judgment that portion thereof which awarded recovery against the surety.
The order appealed from is reversed, and the cause remanded, with instructions to the trial court to enforce the judgment as originally entered.
Mount, C. J., Fullerton, and Dunbar, JJ., concur.
Rudkin, Root, and Crow, JJ., took no part.