
185 S.W.3d 499 (2005)
Clarence D. BROWN, Appellant,
v.
LUBBOCK COUNTY COMM. COURT, et al., Appellees.
No. 07-04-0265-CV.
Court of Appeals of Texas, Amarillo, Panel D.
September 13, 2005.
Opinion Overruling Rehearing November 21, 2005.
*502 Clarence D. Brown, Snyder, pro se.
John Charles Grace, Asst. Criminal Dist. Atty., Lubbock, Carol Gardner, Asst. Atty. General, Austin, for appellee.
Before QUINN, C.J., and REAVIS and CAMPBELL, JJ.

OPINION
JAMES T. CAMPBELL, Justice.
Appellant, Clarence D. Brown, appeals the dismissal of his suit pursuant to Chapter 14 of the Texas Civil Practice and Remedies Code. We affirm the dismissal.
Brown is an inmate confined in the Institutional Division of the Texas Department of Criminal Justice as a result of a conviction for sexual assault in 1997 or 1998. In February 2004 he brought suit against the Lubbock County Commissioners Court, the commissioners, the Lubbock County District Attorney and the judge of the 72nd District Court, Blair Cherry, alleging they deprived him of constitutional rights by creating and applying procedures which denied him the assistance of counsel prior to his indictment. He also alleged the district attorney engaged in malicious prosecution. Appellant sought recovery of $300,000.00 in actual damages, plus punitive damages from each defendant. He attached an affidavit of indigence and copy of his inmate trust account statement to his petition. An amended petition added 364th District Judge Bradley Underwood and Lubbock County Magistrate Judge David Hazlewood as defendants.
The Lubbock County defendants[1] filed an answer including a plea to the jurisdiction asserting sovereign immunity and affirmative defenses including the failure to give notice of claim under the Texas Tort Claims Act,[2] failure to comply with Chapter 14 of the Civil Practice and Remedies Code, and limitations. In a separate answer the district judge defendants asserted defenses of absolute immunity, limitations, and the failure to comply with Chapter 14 of the Civil Practice and Remedies Code. They also alleged the claims were frivolous and sought recovery of attorney's fees and costs.
The district judge defendants filed a motion to dismiss pursuant to Chapter 14. The motion sought dismissal without prejudice on the basis appellant failed to file an affidavit or statement of previous suits (§ 14.004), the disposition of administrative grievance (§ 14.005), or certified copy of his inmate trust account (§ 14.006(f)). It sought dismissal with prejudice under section 14.003 on the basis the suit was frivolous *503 or malicious, arguing the suit had no probability of success because judges have absolute immunity and the claims were barred by the two-year limitations applicable to actions under Title 42, Section 1983 of the United States Code.
The trial court dismissed the claims against all defendants, with prejudice, on April 14, 2004.[3] The order recites appellant's claims lack an arguable basis in law and were dismissed pursuant to section 14.003. It also dismissed for failure to comply with sections 14.004, 14.005, and 14.006(f). Appellant perfected appeal from that order and filed a motion for rehearing. The motion for rehearing detailed the authority on which appellant relies to support his position the defendants illegally denied him the timely assistance of counsel. In the motion appellant also argued the trial court's dismissal for failure to comply with the procedural requirements of Chapter 14 should not have been with prejudice because any such defects can be cured. Appellant attached a declaration of previously filed suits to his motion for rehearing. That document listed ten suits, each of which were petitions for habeas corpus arising out of his sexual assault conviction. The trial court denied the motion by express order on May 11, 2004.
Appellant now presents five issues on appeal, asking (1) whether the trial court abused its discretion in dismissing his suit with prejudice under sections 14.004, 14.005, and 14.006(f) of the Civil Practice & Remedies Code, (2) whether his claims lack an arguable basis in law, (3) whether he was denied the assistance of counsel at a critical stage, (4) whether the policy and procedure used by the District Courts of Lubbock County violate Article V, Section 12(b) of the Texas Constitution and the U.S. Constitution, and (5) whether the defendants' application of Articles 32.001 and 28.061 of the Code of Criminal Procedure violated his federal due process rights.
The district judge defendants respond with a brief arguing dismissal was proper under sections 14.005 and 14.006(f) because appellant failed to file affidavits that he exhausted administrative remedies and of his previous suits. They also argue the suit was properly dismissed as frivolous. The Lubbock County defendants' brief adopts the argument of the district judge defendants, adding that dismissal was proper based on appellant's failure to comply with section 14.004, requiring a separate affidavit listing previous suits.
We address appellant's issues and supporting arguments in the order he presents them. Texas courts have consistently held the affidavit of previous filings required by section 14.004 is a procedural matter which can be cured by amendment. See, e.g., Thomas v. Skinner, 54 S.W.3d 845, 847 (Tex.App.-Corpus Christi 2001, pet. denied); Hickman v. Adams, 35 S.W.3d 120, 125 (Tex.App.-Houston [14th Dist.] 2000, no pet.). The record shows appellant did correct the defect by filing a declaration of his previous suits as an attachment to his motion for rehearing. We agree dismissal with prejudice was not proper under section 14.004.
Section 14.005 applies to suits arising out of a claim "subject to the grievance system established under Section 501.008 [of the] Government Code." When applicable, it requires the inmate to provide the date the grievance was filed, the date of the written decision and a copy of that decision. Section 501.008 of the Government Code directs the Department of *504 Criminal Justice to create a grievance system for inmates. The system is the exclusive administrative remedy for "a claim for relief against the department that arises while the inmate is housed in a facility operated by [or for] the department[.]" Tex. Gov't Code Ann. § 501.008(a) (Vernon 2004). Appellant's claims are not subject to the grievance system under Section 501.008 because they are not against the Department or its employees and did not arise during his confinement. Consequently, section 14.005 is inapplicable to appellant's suit and it does not support the trial court's dismissal of that suit.
On appeal the district judge defendants concede appellant had filed a certified copy of his inmate trust account statement as required by section 14.006(f). We agree and find the dismissal was not supported on that basis. We sustain appellant's first issue. That holding does not require reversal of the trial court's order unless no other basis supports the dismissal.
In his second issue appellant challenges dismissal of his suit as frivolous under section 14.003(a)(2). The statute sets forth factors a trial court may consider in determining whether a claim is frivolous. They include whether (1) the claim's realistic chances of success are slight, (2) the claim has no arguable basis in law or in fact, (3) it is clear the party cannot prove facts supporting the claim, and (4) the claim is substantially similar to a previous claim because it arises from the same operative facts. Id. The trial court's order of dismissal recited its finding the claims lack an arguable basis in law.
Appellant's argument supporting his second and third issues focuses on the merits of his claim that the period between his arrest and indictment was a "critical stage" of the proceeding against him at which the right to counsel attached, and the failure to appoint counsel deprived him of a right secured by the constitution. He concludes this deprivation supports a claim under Title 42, Section 1983 of the United States Code.
Judges acting in their judicial capacity have immunity from liability and suit for judicial acts performed within the scope of their jurisdiction. See Dallas County v. Halsey, 87 S.W.3d 552, 554 (Tex. 2002). This immunity extends to actions that are done in error, maliciously, and even in excess of the judge's authority. See Stump v. Sparkman, 435 U.S. 349, 356-57, 98 S.Ct. 1099, 55 L.Ed.2d 331 (1978). It is overcome only for actions that are: (1) nonjudicial, that is, not taken in the judge's official capacity; or (2) taken in the complete absence of all jurisdiction. Mireles v. Waco, 502 U.S. 9, 11-12, 112 S.Ct. 286, 116 L.Ed.2d 9 (1991). Appellant's petition clearly alleges the judicial defendants were acting in their judicial capacities. It does not allege they acted in the complete absence of jurisdiction. Appellant did not address appellees' claims of immunity in the trial court or his initial brief on appeal. In a reply brief, appellant argues judicial immunity does not apply to claims for declaratory relief. Such an exception would be inapplicable here because the only relief sought in appellant's petition was recovery of money damages. The trial court did not abuse its discretion in finding the claims against district judges Blair Cherry and Bradley Underwood, and magistrate judge David Hazlewood[4] lack an arguable basis in law and dismissing the claims against those defendants.
*505 Prosecuting attorneys also enjoy immunity when performing in their role as prosecutors. Imbler v. Pachtman, 424 U.S. 409, 96 S.Ct. 984, 47 L.Ed.2d 128 (1976). Texas courts have followed federal courts and consistently held as a matter of law that absolute immunity extends to quasi-judicial officers, including prosecutors performing such typical prosecutorial functions as initiating criminal prosecution and presenting the State's case. Oden v. Reader, 935 S.W.2d 470, 474-75 (Tex.App.-Tyler 1996, no pet.). Even allegations a prosecutor's decisions were the result of bribes are insufficient to destroy immunity. Clawson v. Wharton County, 941 S.W.2d 267, 271 (Tex.App.-Corpus Christi 1996, writ denied). The record supports a conclusion by the trial court that the Lubbock County District Attorney was acting in a quasi-judicial capacity and is immune from appellant's claims. The trial court did not abuse its discretion in dismissing the claims against District Attorney William Sowder.
Individuals acting in a legislative capacity are also immune from liability for their legislative actions. In re Perry, 60 S.W.3d 857, 859 (Tex.2001). Legislative immunity applies to legislators at the federal, state, and local levels of government. Joe v. Two Thirty Nine Joint Venture, 145 S.W.3d 150, 157 (Tex.2004), citing Bogan v. Scott-Harris, 523 U.S. 44, 53, 118 S.Ct. 966, 140 L.Ed.2d 79 (1998). Commissioners court duties include legislative, executive and judicial functions. Ector County v. Stringer, 843 S.W.2d 477, 478 (Tex. 1992). The adoption of a policy by a commissioner's court is legislative in nature because it reflects a discretionary, policymaking decision of general application. See In re Perry, 60 S.W.3d at 860. Appellant's claims against the members of the commissioners court arise from their performance of legislative functions and are barred by those defendants' legislative immunity. The trial court did not abuse its discretion in dismissing appellant's claims against the members of the commissioners' court.
To any extent appellant's naming the Lubbock County Commissioner's Court as a defendant implicates Lubbock County, we note that the county is protected by sovereign immunity as a subdivision of the state. Catalina Development, Inc. v. County of El Paso, 121 S.W.3d 704, 705 (Tex.2003). Unless waived, sovereign immunity deprives a trial court of subject matter jurisdiction. Texas Dept. of Parks & Wildlife v. Miranda, 133 S.W.3d 217, 224 (Tex.2004). Appellant did not plead any waiver of sovereign immunity applicable to the Lubbock County Commissioners Court and dismissal of his claims against that defendant was proper.
We find the trial court did not err in dismissing appellant's suit as frivolous pursuant to section 14.003 of the Texas Civil Practice & Remedies Code. We overrule his second issue. Appellant's remaining issues seek, in effect, declarations that the policies and procedures used for appointment of counsel in criminal cases in Lubbock County deprived him of a constitutional right. Such determinations would not affect the outcome of this proceeding, and our addressing the issues would result merely in advisory opinions which we may not issue. See Valley Baptist Medical Ctr. v. Gonzalez, 33 S.W.3d 821, 822 (Tex.2000). See also Tex.R.App. P. 47.1 (opinion must address those issues necessary to final disposition of the appeal). We affirm the trial court's order.

ON MOTION FOR REHEARING
Appellant has presented a motion for rehearing challenging the holdings in our original opinion concerning his asserted claims for declaratory relief, and his claims *506 against Lubbock County and its commissioners court. With these comments, we will overrule the motion for rehearing.
Appellant's motion seeks rehearing of our determination that his claims against the judicial defendants were barred by the doctrine of absolute immunity. In our original opinion we noted that appellant had argued in a reply brief that judicial immunity would not bar his claims for declaratory relief. In response to that argument, we found that appellant's pleadings did not seek declaratory relief. On rehearing, appellant concedes the prayer in his amended petition did not seek declaratory relief, but points out the paragraphs asserting claims against each defendant did. Even assuming, arguendo, the amended petition was sufficient to give fair notice of claims for declaratory relief, and assuming, arguendo, that a claim for declaratory relief only might not be barred by absolute judicial immunity,[1] that would not alter our conclusion the trial court did not abuse its discretion in dismissing the claims against district judges Cherry and Underwood, and magistrate judge Hazlewood, because they lack an arguable basis in law.
Neither appellant's original petition nor his appellate brief identify the specific declaration he seeks. He appears to seek a declaration that each of the judges deprived him of his constitutional right to counsel, but does not indicate how such a declaration would settle any uncertainty or controversy. See Tex. Civ. Prac. & Rem.Code Ann. § 37.008 (Vernon 1997) (authorizing denial of relief when declaration would not resolve controversy). In a reply brief on rehearing, and in response to appellees' contention his exclusive remedy is through a habeas corpus proceeding, appellant denies he is attempting to invalidate his conviction, but observes "should [he] decide to file a habeas [corpus] application, the [declarations] will assist the habeas court in deciding whether [he] was denied the effective assistance of counsel[.]"[2]
The United States Supreme Court discussed the relationship between claims under section 1983 and habeas corpus in Heck v. Humphrey, 512 U.S. 477, 114 S.Ct. 2364, 129 L.Ed.2d 383 (1994). The Court concluded:
[I]in order to recover damages for ... harm caused by actions whose unlawfulness would render a conviction or sentence invalid, a § 1983 plaintiff must prove that the conviction or sentence has been reversed on direct appeal, expunged by executive order, declared invalid by a state tribunal authorized to make such determination, or called into question by a federal court's issuance of a writ of habeas corpus, 28 U.S.C. § 2254. A claim for damages bearing that relationship to a conviction or sentence that has not been so invalidated is not cognizable under § 1983.
Id. at 486-87. In Young v. Dretke, 356 F.3d 616 (5th Cir.2004), on which appellant relies, the Fifth Circuit held that an appointed counsel's failure to seek pre-indictment dismissal, on the same grounds appellant now asserts would have precluded his prosecution, established the denial of *507 the right to counsel and entitlement to habeas corpus relief. Id. at 629.
Application of the holding in Young to the standard established in Heck compels the conclusion that appellant's section 1983 claims are so related to his conviction that they may not be asserted before the granting of the writ of habeas corpus, or other post-conviction relief "invalidating" his conviction. See Heck, 512 U.S. at 487. Restated, he may not prosecute a claim under section 1983 to support a future habeas corpus petition, but must obtain relief by habeas corpus to assert a section 1983 claim. Therefore the trial court could have found his assertion of the 1983 claim against the judicial defendants without the prerequisite "invalidation" of his conviction has no arguable basis in law.
Appellant's motion for rehearing also challenges the statement in our original opinion that to any extent Lubbock County is implicated by his suit naming the members of its commissioner's court, the county is immune from suit as a subdivision of the state. He contends his petition properly can be read as asserting a section 1983 claim against Lubbock County,[3] and that counties are not protected by state-law sovereign immunity from suits under section 1983.[4] Appellant's asserted claims against the commissioners similarly are based on the alleged denial of appellant's right to counsel at what he contends is a critical stage of his prosecution. The trial court thus could have concluded those claims, like his claims against the judicial defendants, are not cognizable under section 1983 absent a grant of habeas corpus or similar relief to appellant. Heck, 512 U.S. at 486-87. Even were we to agree with his contentions on rehearing, we therefore could not agree the trial court's dismissal of appellant's claims reflects an abuse of discretion.
Appellant's motion for rehearing is overruled.
NOTES
[1]  The Lubbock County defendants include the Commissioners Court, its members Kenny Maines, James Kitten, Gilbert Flores and Patti Jones, and Lubbock County District Attorney William Sowder.
[2]  Tex. Civ. Prac. & Rem.Code Ann. Ch. 101 (Vernon 2005).
[3]  The record does not show whether the motion to dismiss was presented to the trial court before its ruling.
[4]  See Tex. Gov't Code Ann. § 54.874 (Vernon 2005) (providing magistrate in Lubbock County has the same immunity as a district judge.)
[1]  See Mireles v. Waco, 502 U.S. 9, 10 n. 1, 112 S.Ct. 286, 116 L.Ed.2d 9 (1991); Will v. Michigan Dept. of State Police, 491 U.S. 58, 71 n. 10, 109 S.Ct. 2304, 105 L.Ed.2d 45 (1989).
[2]  As our original opinion noted, the record indicates appellant has filed several petitions in state court for habeas corpus seeking relief from his sexual assault conviction. None have been acted on favorably. The record also reflects that his habeas corpus petition filed in federal court was dismissed with prejudice.
[3]  Appellant's argument on rehearing refers to the commissioners court and Lubbock County interchangeably. Lubbock County offers authority indicating the commissioners court is not an entity capable of being sued separate from the county and contends appellant failed to name the county as a defendant. See Darby v. Pasadena Police Dept., 939 F.2d 311, 313 (5th Cir.1991). Appellant's petition named the members of the commissioners court, other than the county judge, in their individual and official capacities. A suit against a governmental official in his official capacity is a suit against the governmental entity. Will, 491 U.S. at 71; Ware v. Miller, 82 S.W.3d 795, 800 (Tex.App.-Amarillo 2002, pet. denied). We agree with appellant his suit asserted claims against the county.
[4]  Appellant cites, among other cases, Howlett v. Rose, 496 U.S. 356, 110 S.Ct. 2430, 110 L.Ed.2d 332 (1990). See also Leatherman v. Tarrant County Narcotics Intelligence & Coordination Unit, 507 U.S. 163, 166, 113 S.Ct. 1160, 122 L.Ed.2d 517 (1993). Disposition of appellant's motion for rehearing does not require us to assess the application of the holdings of those cases to Lubbock County.
