MS Access 2010: “Cannot open any more databases.”

前端 未结 6 1384
逝去的感伤
逝去的感伤 2020-12-19 05:13

While struggling with a single legacy MS Access application I faced this weird error:

Cannot open any more databases.

The application makes

6条回答
  •  借酒劲吻你
    2020-12-19 05:48

    Your application is trying to open too many connections to the Access database. Its not just the tables in your sql statement that add up to 2048, even the forms, reports, comboboxes, unclosed recordsets etc add up to the number of connections used by your application. Few things you can try out here:
    1. Close the resources (eg record sets) which you are not really using.
    2. If you are making use of domain aggergate functions( eg DLookup), change it with Elookup as it explicitly cleans up after itself.
    3. You can modify your sql code to make use of Temp Tables.
    Hope it helps.

提交回复
热议问题