This is an appeal from an order denying a motion to vacate an order for the examination of some of the defendants in this action before the trial thereof.
*418The affidavit upon which the order for the examination was based is full and complies with all the requirements of § 872 of the Code of Civil Procedure, and § 873 says at its commencement: “The judge to whom such an affidavit is presented must grant an order for the examination if an action is pending,” as it was in this case.
Therefore when the affidavit was presented to the judge he was obliged to make the order and the plaintiff could insist upon his doing so as a matter of right. Webster v. Stockwell, 3 Abb. N. C., 115.
We do not intend to hold that the judge to whom an affdavit is presented is deprived of all discretion. He may examine the paper to ascertain whether the testimony sought is material and necessary, and if he can see that it is immaterial and unnecessary or improper, or that the examination is desired merely for annoyance or delay, he may deny the application. Jenkins v. Putnam„ 106 N. Y., 272; 8 St. Rep., 710.
The order for the examination was properly made in the first instance, and the power of the judge to issue the same was properly exercised, and the motion for its vacation was based upon an affidavit designed to show that the examination of the defendants was unnecessary because they had. all been previously examined in proceedings supplementary to execution, that such examination was full and the statements made therein were extant and available to the plaintiff.
We think the reasons assigned are insufficient to require or justify the vacation of the order. There is a wide difference between an examination in supplementary proceedings and the examination of a witness for the procurement of testimony to be used and read upon the trial of an action, and they piroceed upon entirely different lines.
The one is for the discovery of property and the other is for the discovery of evidence.
The examination under this order will be conducted for the purpose of eliciting testimony relevant to the issues involved in this action, which can be read in evidence upon the trial, whereas the former examination was made with no such view, and can be made available only as admissions against the party examined.
In no view can tire former depositions of these parties be considered as the equivalent of the testimony which the plaintiff is entitled to elicit under the order for their examination in this action.
The order should be affirmed, with ten dollars costs and disbursements.
Pratt, J., concurs; Barnard, P. J., not sitting.