针对通过 ODBC 链接的 MSSQL 使用 VBA 中的 Database.Execute 方法的最佳方式

Optimal way to use Database.Execute method from VBA against MSSQL linked through ODBC

Database.Execute DAO 方法有这么多参数,我不确定从 VBA 代码(MS Access)。我正在通过 ODBC 访问 MSSQL tables。

Database.Execute method (DAO)

现在我是这样使用的:

CurrentDb.Execute "SQL statement comes here"

CurrentDb.Execute "SQL statement comes here", dbSeeChanges

我有两种情况:

但我不确定这是否真的是最好的使用方式。

你现在用的很好...我自己用在非常大的应用程序中,后端有 SQL 服务器....