
434 N.W.2d 483 (1989)
CAREY AND EMMINGS, LTD., Respondent,
v.
Eugene LUDOWESE, Appellant.
No. C8-88-1480.
Court of Appeals of Minnesota.
January 17, 1989.
William A. Moeller, Gislason, Dosland, Hunter & Malecki, New Ulm, for respondent.
*484 Thomas Bennett Wilson, III, Gayle Gaumer, Wilson Law Firm, Edina, for appellant.
Heard, considered, and decided by HUSPENI, P.J., and FOLEY and KALITOWSKI, JJ.

OPINION
KALITOWSKI, Judge.
Appeal arises from the trial court's summary judgment in favor of respondent on a claim for attorney fees and dismissal of appellant's counterclaim of attorney malpractice.

FACTS
This action originally began as an action for attorney fees by respondent against appellant. Respondent represented appellant in a trespass and boundary dispute action, (Schaufler v. Ludowese).
Edward Schaufler and Eugene Ludowese were neighboring farmers. Appellant Ludowese destroyed a fence which had been the boundary line between his property and Schaufler's for approximately 27 years; this led to a boundary dispute between them.
A judgment was entered against appellant. Subsequently, respondent sent a bill to appellant and he returned a check for the full amount of the bill. Later, he stopped payment on the check and the present action for attorney fees resulted.
Appellant, initially acting pro se, counter-claimed alleging attorney malpractice and damages of $234,962.80. He claimed respondent venued the case in the wrong county, failed to raise the claim of adverse possession and failed to hire a proper expert to establish the boundary location.
Respondent brought a first motion for summary judgment claiming appellant failed to introduce any evidence to indicate the boundary line could be determined with any certainty.
Appellant responded with an affidavit of Clinton McLagan indicating, in his opinion, a photogrammetrist could properly identify where the boundary line had been. The trial court found McLagan had the expertise to testify and that it would be within the realm of duty owed by lawyer to client to pursue such an expert. Thus, based on assertions presented by the expert, the first summary judgment motion was denied.
After denial of the motion, appellant had a photogrammetrist review aerial photos. Drawings were made of approximately one-half of the boundary line. A portion of the boundary line was not able to be drawn because it was obscured by trees in all the photographs. Respondent moved for summary judgment a second time and the trial court granted the motion.

ISSUES
1. Did the trial court err in granting summary judgment in favor of respondent where the pleadings, depositions, answers to interrogatories, and admissions on file show there is no genuine issue as to any material fact?
2. Did the trial court err in denying appellant's counterclaim for attorney malpractice where appellant failed to establish that but for respondent's conduct, appellant would have been successful in the underlying claim?

ANALYSIS
On appeal from summary judgment, it is the function of the reviewing court to determine whether there are any issues of material fact and whether the trial court erred in its application of the law. Betlach v. Wayzata Condominium, 281 N.W.2d 328, 330 (Minn.1979) (citing Minneapolis, St.P. & S.S.M.R. Co. v. St. Paul Mercury-Ind. Co., 268 Minn. 390, 129 N.W.2d 777 (1964)).
In order to establish a prima facie case of legal malpractice, appellant must establish the following factors:
(1) the existence of an attorney-client relationship;
(2) the attorney acted negligently or in breach of the contract;

*485 (3) those acts were the proximate cause of the client's damages; and
(4) but for the attorney's conduct, the client would have been successful in the underlying claim.
Togstad v. Vesely, Otto, Miller & Keefe, 291 N.W.2d 686, 692 (Minn.1980) (citing Christy v. Saliterman, 288 Minn. 144, 179 N.W.2d 288 (1970)).
The first factor is not at issue. The parties concede the existence of the attorney-client relationship.
In addressing the final three factors, appellant argues that respondent was negligent by failing to hire an expert to establish the fence line from aerial photographs and by failing to assert a claim of adverse possession. The trial court found that although a claim of adverse possession may not have been specifically referred to, it was indirectly asserted when appellant claimed the boundary was the old fence line and that he was entitled to all of the land up to it. Thus, the court reasoned the Schaufler court necessarily considered the elements of adverse possession.
In granting respondent's motion for summary judgment the trial court found appellant has not produced evidence to prove appellant would have succeeded in the underlying claim but for respondent's alleged malpractice. In making this finding the trial court relied on an affidavit from the original trial judge. We agree with the concurring opinion regarding the appropriateness of the affidavit. However, without reference to the affidavit, the record clearly shows appellant's failure to prevail in the underlying action was not caused by his attorney's conduct.
To prevail at trial, appellant needed clear and convincing evidence that the fence line could have been determined. Theros v. Phillips, 256 N.W.2d 852, 858-59 (Minn. 1977) (citations omitted). However, the trial court in Schaufler found appellant destroyed the only proof of what had actually been the boundary between the property for 27 years and there was no way of accurately reconstructing where the fence had been. In this action the mapping presented by appellant's expert again failed to establish the entire fence line.

DECISION
The trial court did not err in granting respondent summary judgment and dismissing appellant's counterclaim for attorney malpractice.
AFFIRMED.
FOLEY, Judge (concurring specially).
I concur in the result reached here but feel obliged to comment on the propriety of the original trial judge voluntarily submitting an affidavit to support respondent in this matter. In reaching our decision, the affidavit played no part; it was not considered. By filing an affidavit to support respondent, the original trial judge took on the role of an advocate and engaged in pure speculation as to how he would have ruled if certain evidence had been submitted to him at the underlying action  a boundary line dispute.
Appellant had no reasonable opportunity to take the judge's deposition or to meet the matters contained in his affidavit, nor could he. We were compelled to reject any consideration of the matters contained in the affidavit. Having voluntarily submitted an affidavit, it is abundantly clear that no subpoena was necessary to obtain the affidavit and yet, to maintain impartiality and the independence of the judiciary, that is the appropriate procedure in cases where it is proper for a judge to appear as a witness. Minn.Code Jud.Conduct, Canons 1, 3(c)(1) (1974).
The affidavit submitted by the original trial judge had a profound effect on the judge granting the summary judgment motion as is evident from the memorandum filed in support of the order. However well motivated the original trial judge may have been, he and all judges are reminded of Canon 2 of the Minnesota Code of Judicial Conduct, which states in part: "He should not lend the prestige of his office to advance the private interests of others * * *." Minn.Code Jud.Conduct, Canon 2(B). There is an extensive, well-annotated article on the subject of a judge as a witness *486 in a cause not on trial before him. See Annotation, Judge as Witness in Cause Not on Trial Before Him, 86 A.L.R. 3d 633 (1978).
The appearance of the original trial judge as a witness by affidavit in the subsequent action where he was not presiding, if not prejudicial to appellant, was perilously close to being so. Were it not for the fact that this matter can be resolved without reference to the affidavit of the original trial judge, we would be compelled to reverse. There were no special circumstances necessitating an affidavit by the original trial judge in support of respondent, and no affidavit should have been submitted.
