
978 So.2d 17 (2007)
Ex parte ALABAMA DEPARTMENT OF TRANSPORTATION
(In re Good Hope Contracting Company, Inc.
v.
Alabama Department of Transportation).
No. 1060078.
Supreme Court of Alabama.
July 20, 2007.
*20 Roger L. Bates, Mark T. Waggoner, and Stephen N. Fitts III of Hand Arendall, L.L.C., Birmingham, for petitioner.
Jack G. Kowalski, L. Griffin Tyndall, and David Wanhatalo of Burr & Forman, LLP, Birmingham, for respondent.
SEE, Justice.
The Alabama Department of Transportation ("ALDOT") petitions this Court for the writ of mandamus directing the Montgomery Circuit Court to enter an order dismissing the complaint of Good Hope Contracting Company, Inc. ("Good Hope"), on the grounds of sovereign immunity. Because ALDOT has demonstrated a clear legal right to this relief, we grant the petition and issue the writ of mandamus.

Facts and Procedural Background
Between March 2002 and January 2003, Good Hope entered into three contracts with ALDOT pursuant to which Good Hope was to undertake various roadway-construction projects. Those contracts contained similar liquidated-damages clauses that allowed ALDOT to assess liquidated damages against Good Hope, calculated on the basis of the number of days Good Hope exceeded the time allotted under the contract for the completion of the project. The contracts, however, give Good Hope the right to request an extension of time in which to complete the project. They provide that the "Director [of ALDOT] shall have final authority to approve or disapprove the request for an extension of time" and to decide "any question connected with . . . delay in the prosecution of the Work." Petition at 7. Based upon these contract provisions, ALDOT withheld approximately $600,000 in liquidated damages from the contract price owed to Good Hope on the three contracts.
Good Hope sued ALDOT, alleging that the liquidated damages had been wrongfully assessed and seeking damages for breach of contract, negligence, and unjust enrichment and asserting a claim based on quantum meruit. Good Hope also sought a judgment declaring that the liquidated-damages provision in each contract was a penalty and was therefore void, and it sought a writ of mandamus from the trial court directing ALDOT to pay for the services Good Hope had performed under the contracts. ALDOT moved the trial court to dismiss the complaint on the ground that ALDOT, as an agency of the State of Alabama, is entitled to sovereign immunity under § 14, Ala. Const.1901. The trial court set the case for trial without ruling on ALDOT's motion to dismiss.
ALDOT petitioned this Court for the writ of mandamus directing the trial court to dismiss Good Hope's action against it. ALDOT also moved this Court to stay the proceedings in the trial court pending this Court's consideration of ALDOT's petition. We ordered answer and briefs, and we stayed the proceedings in the trial court pending disposition of the petition for the writ of mandamus.

Issue
The issue is whether the trial court erred in failing to dismiss Good Hope's claims against ALDOT on the basis of sovereign immunity.

Standard of Review
As this Court has consistently held, the writ of mandamus is a
"`drastic and extraordinary writ that will be issued only when there is: 1) a clear legal right in the petitioner to the order sought; 2) an imperative duty upon the respondent to perform, accompanied by a refusal to do so; 3) the lack of another adequate remedy; and 4) properly invoked jurisdiction of the court.'"
*21 Ex parte Wood, 852 So.2d 705, 708 (Ala. 2002) (quoting Ex parte United Serv. Stations, Inc., 628 So.2d 501, 503 (Ala.1993)). "`In reviewing the denial of a motion to dismiss by means of a mandamus petition, we do not change our standard of review. . . .'" Drummond Co. v. Alabama Dep't of Transp., 937 So.2d 56, 57 (Ala. 2006) (quoting Ex parte Haralson, 853 So.2d 928, 931 (Ala.2003)).
"In Newman v. Savas, 878 So.2d 1147 (Ala.2003), this Court set out the standard of review of a ruling on a motion to dismiss for lack of subject-matter jurisdiction:
"'A ruling on a motion to dismiss is reviewed without a presumption of correctness. Nance v. Matthews, 622 So.2d 297, 299 (Ala.1993). This Court must accept the allegations of the complaint as true. Creola Land Dev., Inc. v. Bentbrooke Housing, L.L.C., 828 So.2d 285, 288 (Ala.2002). Furthermore, in reviewing a ruling on a motion to dismiss we will not consider whether the pleader will ultimately prevail but whether the pleader may possibly prevail. Nance, 622 So.2d at 299.'
"878 So.2d at 1148-49."
Pontius v. State Farm Mut. Auto. Ins. Co., 915 So.2d 557, 563 (Ala.2005). We construe all doubts regarding the sufficiency of the complaint in favor of the plaintiff. Drummond Co., 937 So.2d at 58.

Analysis
This Court has long held that "`"the circuit court is without jurisdiction to entertain a suit against the State because of Sec. 14 of the Constitution."'" Larkins v. Dep't of Mental Health & Mental Retardation, 806 So.2d 358, 364 (Ala. 2001) (quoting Alabama State Docks Terminal Ry. v. Lyles, 797 So.2d 432, 435 (Ala.2001), quoting in turn Aland v. Graham, 287 Ala. 226, 229, 250 So.2d 677, 678 (1971)). "[A]n action contrary to the State's immunity is an action over which the courts of this State lack subject-matter jurisdiction." Larkins, 806 So.2d at 363.
There are exceptions to the State's sovereign immunity.
"A state official is not immune from an action that (1) seeks to compel a state official to perform his or her legal duties, (2) seeks to enjoin a state official from enforcing unconstitutional laws, (3) seeks to compel a state official to perform ministerial acts, or (4) seeks a declaration under the Declaratory Judgments Act, § 6-6-220 et seq., Ala.Code 1975, construing a statute and applying it in a given situation."
Latham v. Department of Corr., 927 So.2d 815, 821 (Ala.2005).[1] Other actions that are not prohibited by § 14 include:
"(5) valid inverse condemnation actions brought against State officials in their representative capacity; and (6) actions for injunction or damages brought against State officials in their representative capacity and individually where it was alleged that they had acted fraudulently, in bad faith, beyond their authority or in a mistaken interpretation of law."
Drummond Co., 937 So.2d at 58 (emphasis omitted). In this case, ALDOT, as the party asserting the defense of immunity, bore the burden of demonstrating that Good Hope can prove no set of facts establishing one of the exceptions to the State's sovereign immunity. See Ex parte Butts, 775 So.2d 173, 177 (Ala.2000) ("As a general rule, a motion to dismiss `"for failure to state a claim is properly granted only when it appears beyond a doubt that the *22 plaintiff can prove no set of facts entitling him to relief."'" (quoting Patton v. Black, 646 So.2d 8, 10 (Ala.1994), quoting in turn Winn-Dixie Montgomery, Inc. v. Henderson, 371 So.2d 899 (Ala. 1979))).

I. Claims for Damages and Equitable Relief
This Court has repeatedly held that § 14, Ala. Const.1901, "affords the State and its agencies an `absolute' immunity from suit in any court." Haley v. Barbour County, 885 So.2d 783, 788 (Ala.2004); see also Ex parte Mobile County Dep't of Human Res., 815 So.2d 527, 530 (Ala.2001) ("Pursuant to § 14, Ala. Const. of 1901, the State of Alabama and its agencies have absolute immunity from suit in any court."); Ex parte Tuscaloosa County, 796 So.2d 1100, 1103 (Ala.2000) ("Under Ala. Const. of 1901, § 14, the State of Alabama has absolute immunity from lawsuits. This absolute immunity extends to arms or agencies of the state. . . ."). This absolute immunity from suit also bars suits for relief by way of mandamus or injunction. Ex parte Troy Univ., 961 So.2d 105, 110 (Ala.2006).
Because the immunity of the State is absolute, this Court has usually provided that any exceptions to that immunity extend only to suits naming the proper State official in his or her representative capacity. See Latham, 927 So.2d at 821 (laying out the exceptions to sovereign immunity). Even when an action names the proper State official in his or her representative capacity, such an action will be barred if it is, in substance, an action against the State for damages. See Ex parte Town of Lowndesboro, 950 So.2d 1203, 1206 (Ala.2006) ("Additionally, a party may not indirectly sue the State by suing its officers or agents `"when a result favorable to plaintiff would be directly to affect the financial status of the state treasury."'" (quoting Patterson v. Gladwin Corp., 835 So.2d 137, 142 (Ala.2002), quoting in turn State Docks Comm'n v. Barnes, 225 Ala. 403, 405, 143 So. 581, 582 (1932)) (emphasis added in Patterson)).
Good Hope argues that this Court, in Milton Construction Co. v. State Highway Department, 568 So.2d 784 (Ala.1990) ("Milton I"), and State Highway Department v. Milton Construction Co., 586 So.2d 872 (Ala.1991) ("Milton II"), allowed a plaintiff to bring a breach-of-contract action against the State Highway Department, the predecessor agency to ALDOT, notwithstanding the absolute immunity of the State agency. In Milton I, the plaintiff, Milton Construction Company, sought a judgment declaring that the disincentive clause of an incentive/disincentive-payments provision in each of two highway-construction contracts it had entered into with the Highway Department was void and unenforceable as a penalty. On these grounds, Milton asked the trial court to order the Highway Department to pay it the amounts of disincentive payments that the Highway Department had allegedly wrongfully withheld. This Court held that the disincentive clause in the highway-construction contracts was "void as a penalty and therefore unenforceable." 568 So.2d at 791. We remanded the case to the trial court for further proceedings consistent with this Court's opinion.
In Milton II, the Highway Department argued that the doctrine of sovereign immunity barred the trial court from ordering it to repay the money that it had withheld from the plaintiff under the void disincentive clause. This Court stated that "actions brought to force state employees or agencies to perform their legal duties" are among the "established exceptions to the protection afforded the state or its agencies by sovereign immunity." Milton II, 586 So.2d at 875 (emphasis added). *23 We held that sovereign immunity would not bar an action to compel State officials to perform a legal duty, and in this case the Highway Department had incurred a legal duty to pay money owed under the highway-construction contracts.
In Milton II, notwithstanding the language suggesting that the exceptions to sovereign immunity apply to State agencies, the Court held "that this lawsuit is not barred by the doctrine of sovereign immunity, because it is in the nature of an action to compel state officers to perform their legal duties and pay Milton Construction for services contracted for and rendered." 586 So.2d at 875. The case the Court relied on in Milton II, Ex parte Carter, 395 So.2d 65, 68 (Ala.1980), restricts the sovereign-immunity exceptions, except for declaratory-judgment actions, to suits against State officials. In Milton I and Milton II, the plaintiff had named the director of the Highway Department, in his official capacity, as a party to the action, along with the Highway Department. Milton I and Milton II thus do not support Good Hope's claim that it has a right to sue a State agency in the agency's own right on a breach-of-contract theory, and we disavow any contrary implication of the language of those opinions. As we noted above, a State agency is absolutely immune from suit.
Good Hope also argues that it is entitled to "[a] writ of mandamus from the trial court directing ALDOT to perform its contractual and legal duties. . . ." Good Hope's answer at 15. Again, Good Hope has named as a party only the State agency; it has not named any State official. The absolute immunity of the State agency from suit bars actions for relief by mandamus or injunction. Ex parte Troy Univ., 961 So.2d at 110. Each of the cases Good Hope cites, Dampier v. Pegues, 362 So.2d 224, 225-26 (Ala.1978), Hardin v. Fullilove Excavating Co., 353 So.2d 779, 780 (Ala. 1977), and State Board of Administration v. Roquemore, 218 Ala. 120, 121, 117 So. 757, 758 (1928),[2] is a case in which a plaintiff sought the writ of mandamus directing a State official, not the State agency itself, to act.
Because the immunity of a State agency is "absolute" under § 14, Ala. Const.1901, ALDOT is also immune from the counts in Good Hope's complaint alleging negligence and unjust enrichment and seeking recovery under a theory of quantum meruit. See § 14, Ala. Const. 1901 ("[T]he State of Alabama shall never be made a defendant in any court of law or equity."); Ex parte Alabama Dep't of Mental Health & Mental Retardation, 837 So.2d 808, 810-11 (Ala.2002) (dismissing an action alleging negligence against a State agency on the ground of the agency's absolute immunity from suit). In short, there is no set of facts that will support the negligence, unjust enrichment, and quantum meruit allegations of the complaint; therefore, Good Hope cannot prevail on those claims.

II. The Declaratory-Judgment Aspect of Good Hope's Complaint
Good Hope argues that it is entitled to a declaratory judgment against ALDOT notwithstanding the doctrine of sovereign immunity. Implicit in this argument is the proposition that Good Hope can sue the State agency directly instead of naming as a defendant the relevant State official.
*24 We discussed the declaratory-judgment exception to State immunity in Ex parte Town of Lowndesboro. In that case, the Town of Lowndesboro and a landowner filed a declaratory-judgment action against the Alabama Department of Environmental Management ("ADEM") seeking to invalidate a permit issued by ADEM to operate a solid-waste landfill. Ultimately, the trial court declared the landfill permit void, and it awarded the plaintiffs interim attorney fees and expenses. ADEM appealed to the Court of Civil Appeals, which reversed the trial court's judgment on the ground of sovereign immunity. On certiorari review, we affirmed the judgment of the Court of Civil Appeals. Although the declaratory-judgment action named only the State agency, and not a State official, we "expressed] no opinion" regarding whether the underlying declaratory-judgment action was permissible under § 14. We concluded that the award of attorney fees and costs was prohibited by the State's sovereign immunity.
Similarly, we express no opinion regarding whether the declaratory-judgment exception allows Good Hope to name a State agency as a defendant notwithstanding that agency's "absolute immunity" under § 14, Ala. Const.1901. Even if we were to assume that the declaratory-judgment exception could apply to an action naming a State agency,[3] the exception would be of no help to Good Hope. The declaratory-judgment exception to sovereign immunity applies when the declaratory-judgment *25 action seeks no relief other than the "`construction of a statute and how it should be applied in a given situation.'" Ex parte Town of Lowndesboro, 950 So.2d at 1211 (quoting Aland v. Graham, 287 Ala. at 230, 250 So.2d at 679). Good Hope's complaint does not ask the trial court to construe a statute and declare how it should be applied. Instead, it asks the trial court to declare the liquidated-damages provision of its contracts with ALDOT illegal as an unenforceable penalty. For the first time in this Court, Good Hope argues that in its complaint it was seeking a declaratory judgment construing § 41-16-3(a), Ala.Code 1975, which reads, in pertinent part, as follows:
"Whenever the State of Alabama is a party to any contract, the contract shall be executed by all parties in a timely fashion. When a party to a contract, other than the state, has fully executed the responsibility under the contract and there remains only the payment of funds by the state, payment shall be made in a timely manner."
Good Hope does not explain how this statute is legally relevant to its claim.
Moreover, "[s]ection 14 bars an action characterized as a declaratory-judgment action `when it is nothing more than an action for damages.'" Ex parte Town of Lowndesboro, 950 So.2d at 1211 (quoting Lyons v. River Road Constr., Inc., 858 So.2d 257, 263 (Ala.2003)). It is not at all apparent how our construction of § 41-16-3(a) could benefit Good Hope unless, in construing it, we also concluded that the liquidated-damages provision in the contracts is void as a penalty or that ALDOT otherwise breached its contractual obligations. A result favorable to Good Hope, however, would then directly affect a contract right of ALDOT and would "necessarily open the doors of the State treasury to legal attack." Ex parte Town of Lowndesboro, 950 So.2d at 1211. Good Hope has gone beyond "pray[ing] for guidance both to complainant and the State officers trying to enforce the law so as to prevent them from making injurious mistakes through an honest interpretation of the law. . . ." Curry v. Woodstock Slag Corp., 242 Ala. 379, 381, 6 So.2d 479, 481 (1942). For this reason, even though Good Hope's complaint is styled in part as seeking a declaratory judgment, it is nonetheless barred by the immunity provision of § 14, Ala. Const.1901.

III. Proper Parties
Good Hope has named only ALDOT, and not its director, as a party to this case. ALDOT argues that, because no State official has been named as a defendant in the action, the exceptions relating to State officials do not apply, and the action should be dismissed.[4]
Good Hope argues that, if this Court concludes that ALDOT is not a proper party, we should direct the trial court to allow Good Hope to amend its complaint to add the proper party. Good Hope cites Drummond Co., 937 So.2d at 58, for the proposition that this Court may order the trial court to add the director of ALDOT as the defendant and to permit the litigation to proceed accordingly. However, in Drummond Co., ALDOT had moved, as an alternative to granting its motion to dismiss, to substitute the director of the agency as a defendant. Nothing in the materials before this Court suggests that either ALDOT or Good *26 Hope has moved to substitute the director for ALDOT. In fact, ALDOT argued in its motion to dismiss that, as a State agency, it was not the proper party to be sued, and it pointed out that Good Hope had failed to name any State official as a party. ALDOT's supplemental submission and brief in support of motion to dismiss, tab 3 at 8.
Further, in Ex parte Blankenship, 893 So.2d 303, 306-07 (Ala.2004), this Court held that, if a trial court lacks subject-matter jurisdiction, it has no power to take any action other than to dismiss the complaint. A trial court lacks subject-matter jurisdiction if the defendant is immune under the doctrine of sovereign immunity. Larkins, 806 So.2d at 364 ("`Article I, § 14, of the Alabama Constitution of 1901 thus removes subject-matter jurisdiction from the courts when an action is determined to be one against the State.'" (quoting Lyles, 797 So.2d at 435)). Thus, this Court cannot order the trial court to allow Good Hope to amend its complaint because the trial court lacks subject-matter jurisdiction.
Good Hope also apparently suggests that this Court may order a substitution of the parties. It cites Rule 25(d), Ala. R. Civ. P., and Rule 43(c), Ala. R.App. P., in support of its argument that its failure to add the director of ALDOT as a party to this action does not necessitate a dismissal. However, Rule 25(d), Ala. R. Civ. P.,[5] deals only with the situation in which a public official leaves office during the pendency of an action; it provides that the public official's successor is automatically substituted as a party in the case. Rule 25(d) thus does not provide for the automatic substitution of a public official for a State agency because the plaintiff failed to join the public official as the proper party.
Good Hope also argues that Rule 43(c), Ala. R.App. P., gives this Court the authority to order a substitution of parties in this case. Rule 43(c), Ala. R.App. P., provides that "[a]n order of substitution may be entered at any time, but the omission to enter such an order shall not affect the substitution." However, reading this subsection in the context of the rest of the rule suggests that it relates only to substitutions made by operation of law under Rule 43, such as when a party to an appeal dies or a public official who is a party to an appeal leaves office. It does not specifically allow this Court to substitute parties at its discretion, and Good Hope has not presented any authority suggesting that we have the authority to do so.[6]

Conclusion
Because no exception to ALDOT's sovereign immunity applies in this case, *27 the trial court erred in denying ALDOT's Rule 12(b)(1), Ala. R. Civ. P., motion to dismiss. Because the complaint purported to effect an action against the State in violation of § 14, Ala. Const.1901, the trial court acquired no subject-matter jurisdiction over this action. "`"Lacking subject matter jurisdiction [a court] may take no action other than to exercise its power to dismiss the action. . . . Any other action taken by a court lacking subject matter jurisdiction is null and void."'" Ex parte Blankenship, 893 So.2d at 307 (quoting State v. Property at 2018 Rainbow Drive, 740 So.2d 1025, 1029 (Ala.1999), quoting in turn Beach v. Director of Revenue, 934 S.W.2d 315, 318 (Mo.Ct.App.1996)). ALDOT has demonstrated a clear legal right to an order directing the trial court to dismiss Good Hope's complaint.
PETITION GRANTED; WRIT ISSUED.
COBB, C.J., and LYONS, WOODALL, STUART, SMITH, BOLIN, PARKER, and MURDOCK, JJ., concur.
NOTES
[1]  See infra note 3.
[2]  Although the case is styled State Board of Administration v. Roquemore, the summary of the case states that "[t]he petition is for a writ of mandamus to C.A. Moffett, as president of the state board of administration, and to Woolsey Finnell, as president of the state highway commission, to audit and voucher for payment the petitioner's account for hay sold and delivered to the state highway department." 218 Ala. at 121, 117 So. at 758.
[3]  It may be argued that language from some of our cases would permit a declaratory-judgment action directly against the State or its agencies, because those cases do not expressly limit declaratory-judgment actions to State officials. See, e.g., Drummond Co., 937 So.2d at 58 ("`There are four general categories of actions which in Aland v. Graham, 287 Ala. 226, 250 So.2d 677 (1971), we stated do not come within the prohibition of § 14:(1) actions brought to compel State officials to perform their legal duties; (2) actions brought to enjoin State officials from enforcing an unconstitutional law; (3) actions to compel State officials to perform ministerial acts; and (4) actions brought under the Declaratory Judgments Act, Tit. 7, § 156, et seq., seeking construction of a statute and its application in a given situation.'" (quoting Ex parte Carter, 395 So.2d at 68)); Patterson v. Gladwin Corp., 835 So.2d at 142 ("This Court has recognized several species of action that are not `against the State' for § 14 purposes. They include: `(1) Actions brought to compel State officials to perform their legal duties. (2) Actions brought to enjoin State officials from enforcing an unconstitutional law. (3) Actions to compel State officials to perform ministerial acts. (4) Actions brought under the Declaratory Judgments Act, [Ala.Code 1975, § 6-6-220 et seq.], seeking construction of a statute and how it should be applied in a given situation." (citations omitted) (quoting Aland v. Graham, 287 Ala. at 229-30, 250 So.2d at 679)); Aland v. Graham, 287 Ala. at 229-30, 250 So.2d at 679 ("Without professing to cover every situation that has arisen, there are four general categories of actions that we have held do not come within the prohibition of Sec. 14.(1) Actions brought to compel State officials to perform their legal duties. (2) Actions brought to enjoin State officials from enforcing an unconstitutional law. (3) Actions to compel State officials to perform ministerial acts. (4) Actions brought under the Declaratory Judgments Act, Tit. 7, § 156 et seq., Code 1940, seeking construction of a statute and how it should be applied in a given situation.'" (citations omitted)). But see Latham v. Department of Corr., 927 So.2d at 821 (limiting the declaratory-judgment exception to actions against State officials). The case cited by Aland as authority for the declaratory-judgment exception, Curry v. Woodstock Slag Corp., 242 Ala. 379, 381, 6 So.2d 479, 480-81 (1942), explains that, "[w]hen [a declaratory judgment] is only sought to construe the law and direct the parties, whether individuals or State officers, what it requires of them under a given state of facts, to that extent it does not violate section 14. . . ." (Emphasis added.) Nonetheless, we do not here address whether the declaratory-judgment exception applies to actions against a State agency, and not against a State official, because the case before us does not require us to address that issue.
[4]  ALDOT apparently concedes that the exception to sovereign immunity for declaratory-judgment actions may apply to it. Petition at 17; see also Drummond Co., 937 So.2d at 58 (laying out exceptions to sovereign immunity and not limiting the exception for declaratory-judgment actions to State officials).
[5]  Rule 25(d), Ala. R. Civ. P., provides:

"(1) When a public officer is a party to an action in an official capacity and during its pendency dies, resigns, or otherwise ceases to hold office, the action does not abate and the officer's successor is automatically substituted as a party. Proceedings following the substitution shall be in the name of the substituted party, but any misnomer not affecting the substantial rights of the parties shall be disregarded. An order of substitution may be entered at any time, but the omission to enter such an order shall not affect the substitution.
"(2) A public officer who sues or is sued in an official capacity may be described as a party by the officer's official title rather than by name; but the court may require the officer's name to be added."
[6]  "`Where an appellant fails to cite any authority for an argument, this Court may affirm the judgment as to those issues, for it is neither this Court's duty nor its function to perform all the legal research for an appellant.'" Birmingham News Co. v. Horn, 901 So.2d 27, 78 (Ala.2004) (quoting Sea Calm Shipping Co. v. Cooks, 565 So.2d 212, 216 (Ala. 1990)).
