Passing DAO.Workspace as a parameter - Bad idea?

筅森魡賤 提交于 2019-12-12 03:17:12

问题


In David Fenton's answer to the question "MS Access (Jet) transactions, workspaces" he states:

I would also say, never pass the workspace -- only pass the objects you've created with the workspace.

Is passing the workspace a bad idea? If so, why?


Additional info:

My intent here is to execute INSERT/UPDATE/DELETE statements from within multiple Subs/Functions but wrap them all in a single transaction.

The base functionality is wrapped up in a class module. I want to be able to isolate multiple instances of the class module, which means I can't just assume my transactions are executing against the default workspace.

来源:https://stackoverflow.com/questions/9264386/passing-dao-workspace-as-a-parameter-bad-idea

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!