Where the defendant has neglected to appear upon the return of a summons, or has failed to answer the complaint, or where an issue of fact has joined in an action; and it appears, by affidavit, upon the application of either party, that a witness, not within the County of Albany or a county adjoining thereto, including the County of Rensselaer, is material in the prosecution or defense of the action, the Court may award a commission to one (1) or more competent persons, authorizing them, or any of them to examine the witness under oath, upon interrogatories to be settled by the Court, or by written agreement of the parties, and indorsed upon or annexed to the commission; to take and certify the deposition of the witness; and to return the same by mail, addressed to the Clerk of the Court.
If both parties expressly consent, a commission may issue without written interrogatories, and the deposition may be taken upon oral questions.
The commission may be granted by the Court without notice, upon the application of the plaintiff, made at the return of the summons, or upon the application of either party, made at the time of the joinder of issue. It may also be granted at any time after the joinder of issue, upon the application of either party, accompanied with proof, by affidavit, that three (3) days' written notice of the application has been served upon the adverse party, either personally or by service upon the attorney who appeared for him before the Court.
Where a commission is granted, the party upon whose application it is issued is entitled to such an adjournment of the trial as may be necessary to procure the commission to be executed and returned.
A. 
The person to whom a commission is directed, or before whom a deposition is taken, unless otherwise expressly directed in the commission, or in the order for taking the depositions, must execute the commission, or the order, as follows:
(1) 
He must publicly administer, to each witness examined, an oath or affirmation to testify the truth, the whole truth, and nothing but the truth, as to the matters respecting which the witness is examined.
(2) 
He must reduce the examination of each witness to writing, or cause it to be reduced to writing, by a disinterested person. After it has been carefully read, to or by the witness, it must be subscribed by the witness.
(3) 
If an exhibit is produced and proved, the exhibit, or, if the witness or other person having it in his custody does not surrender it, a copy thereof, must be annexed to the deposition to which it relates, subscribed by the witness proving it, and numbered or otherwise identified, in writing thereupon, by the commissioner or other person taking the deposition, who must subscribe his name thereto.
(4) 
The commissioner, or person taking the deposition, must subscribe his name to each half sheet of the deposition and he must annex all the depositions and exhibits to the commission, or to a certified copy of the order for taking the deposition, with the certificate specified in the next section, and he must close them up under his seal, and address the packet to the Clerk of the Court, at his official residence.
(5) 
If there is a direction on the commission, or in the order, to return the same through the post office, he must immediately deposit the packet, so addressed, in the post office, and pay the postage thereon.
(6) 
If there is a direction on the commission, or in the order, to return the same by an agent of the party, at whose instance it was issued or granted, the packet so addressed must be delivered to the agent.
(7) 
Where a commission is directed to two (2) or more persons, one (1) or more of them may execute it, as prescribed in this and the next section.
B. 
A copy of this and of the next section must be annexed to each commission, or order to take depositions, authorized by this article.
The commissioner or other person, before whom one (1) or more depositions are taken, must subscribe, and annex to each deposition, a certificate, substantially in the following form, the blanks being properly filled up:
State (or territory) of ..........................
ss.:
County (or parish) of ............................
   I, ............... do certify that ............... the witness personally appeared before me on the ............ day of ............... at .... o'clock in the ........... noon, at the .......... in the state (or territory) of .................... and after being sworn (or affirmed, as the case may be), to testify the truth, the whole truth, and nothing but the truth, did depose to the matters contained in the foregoing deposition, and did, in my presence subscribe the same and indorse the exhibits annexed thereto. And I further certify that I have subscribed my name to each half sheet thereof, and to each exhibit.
  And I further certify that .............. appeared in behalf of the ............. plaintiff and that .................... appeared in the behalf of the ..................
The certificate specified in the last section is a sufficient return to a commission.
Where it appears, by affidavit, that a deposition has been improperly or irregularly taken or returned or that the personal attendance of the witness, upon the trial, could have been procured, with due diligence, by a subpoena, or that the attorney for either party has practiced any fraud, or unfair or overreaching conduct, to the prejudice of the adverse party, in the course of the proceedings, an order for the suppression of the deposition may be made by the Court, upon the application of the party aggrieved, upon notice to the adverse party.
A deposition, taken and returned as prescribed in this article, may, unless it is suppressed as prescribed in the last section, be read in evidence by either party. It has the same effect, and no other, as the oral testimony of the witness would have; and an objection to the competency or credibility of the witness, or to the relevancy, or substantial competency, of a question put to him, or of an answer given by him, may be made, as if the witness was then personally examined, and without being noted upon the deposition.
Where the commission is executed within the state, the commissioner, or if there are two (2) or more a majority of them, has the same power to issue a subpoena, to swear a witness, and to compel his attendance that a Justice of the Peace has, in an action pending before him.
The Clerk of the Court must on receiving the package containing the commission, transmitted to him by mail or otherwise, open and file it, indorsing thereupon the date of his so doing. It must remain on file with him, until the trial; but either party is entitled to inspect it on file.
Either party to an action pending in the City Court may apply for an order to have the testimony of any witness who is about to depart from the County of Albany or a county adjoining thereto, including the County of Rensselaer, and will probably continue absent, when the testimony is required, or is so sick or infirm as to afford reasonable ground to believe that he will not be able to attend the trial, or where any other special circumstances exist which render it proper that he be examined as prescribed in this article, taken conditionally to be used on the trial of such action, subject to the provisions of this article.
The party desiring to take a deposition, as prescribed in the last section, must present to the Court an affidavit showing:
A. 
The title and nature of the action. The name and residence of the person to be examined. That the testimony of such person is material and necessary for the party making such application or for the prosecution or defense of such action.
B. 
That the person to be examined is about to depart from the County of Albany or a county adjoining thereto, including the County of Rensselaer, as the case may be, or that he is so sick or infirm as to afford reasonable ground to believe that he will not be able to attend the trial, or that any other special circumstances exist which render it proper that he should be examined, as prescribed in this article; but this subsection does not apply to a case where the person to be examined is a party to the action, except in the case of sickness or infirmity.
C. 
If the party sought to be examined is a corporation, the affidavit shall state the name of the officers or directors thereof, or any of them whose testimony is necessary and material, or the books and papers as to the contents of which an examination or inspection is desired, and the order to be made in respect thereto shall direct the examination of such persons and the production of such books and papers.
The parties to an action may stipulate in writing that an order specified in § 30-187 of this article may be granted, in which case an affidavit, as required by the preceding sections, shall not be necessary. But this section does not apply to a case where the person to be examined is confined in a prison or jail within the state.
Where an affidavit is presented as provided in § 30-185 of this article, the Court may, if the opposing party or his representative is not present, require that a reasonable notice of the application be given, or may act on the application at the time of such presentation, and must grant an order for the taking of the deposition, if satisfied of the truth of the matter stated in the affidavit, and may in his discretion designate and limit the particular matters on which the examination is to be conducted. The order may require that the examination be conducted before the Court, at the time fixed, or may permit such examination to be conducted at the place where the person to be examined is at the time fixed for said examination. Where the deposition is not taken in court, the order may permit the examination of the person making the deposition to proceed after having been sworn before an officer authorized to take and administer oaths.
Witnesses' fees, as provided in this Part 2, for attendance upon a trial, must be paid or tendered when the order is served upon the party or other person required to attend. If the party or person so served fails to obey the order his attendance may be compelled, and he may be punished in like manner, and the proceedings thereon are the same as if he failed to obey a subpoena issued from the City Court.
A copy of the order and of the affidavit upon which it was granted must be served at least two (2) days before the time fixed for the examination, upon the attorney for each party to the action, in like manner as a paper in the action; or if a party has not appeared in the action they must be served upon him as directed by the order.
The Court may upon good cause shown adjourn the time for taking said examination.
Where the party or other person to be examined is confined in a prison or jail within the state, under sentence for a misdemeanor or felony, that fact must be stated in the affidavit, and his deposition may be taken as prescribed in the foregoing sections as if he was not so confined except that in such a case the granting or refusing of the order is always in the discretion of the Court. The order must require the production of the prisoner by the person in charge of the prison or jail, at the prison or jail, but it may prescribe such regulations and restrictions with respect there to as the Court deems proper.
The deposition shall be in the form of question and answer, and when completed must be carefully read to and subscribed by the person examined; and within three (3) days thereafter, unless sooner required by the order, must be filed in the office of the Clerk, together with the stipulation or the affidavit on which the order was granted and proof of the service of the order and of the affidavit. If upon an examination the person examined refuses to answer that fact must be reported to the Court, which must determine whether the question was relevant and the witness bound to answer.
The deposition may be read in evidence by either party of the trial of the action, if it be satisfactorily proved that the witness is dead or is unable to personally attend by reason of his insanity, sickness or other infirmity, or that he is confined in a prison or jail, or that he has been and is absent from the County of Albany or any county adjoining thereto, including the County of Rensselaer, so that his attendance could not, with reasonable diligence, be compelled by subpoena.
The deposition so read in evidence has the same effect, and no other, as the oral testimony of the witness would have; and an objection to the competency or credibility of the witness, or to the relevancy or substantial competency of a question put to him, or of an answer given by him, may be made as if the witness was then personally examined and without being noted upon the deposition.