【发布时间】:2013-02-10 23:00:47
【问题描述】:
在 Excel 的 VBA 模块中。 使用 ADODB.Connection 和此连接字符串:
"Provider=SQLOLEDB;Data Source=MARS;Initial Catalog=automation;Trusted_connection=yes;"
我想:
- INSERT INTO 测试(数据)值(“某事”)
- 检索新插入行的自动递增标识 (test.data_id)。
【问题讨论】:
-
这里有帮助你的问题stackoverflow.com/questions/976593/…
-
感谢 Hiten0004。我之前看过那个。我无法让它在 VBA 中工作。
-
你的解决方案就是答案。
标签: sql-server excel ado vba