Steps to Reproduce Behavior
The following example assumes that you have an Open Database Connectivity (ODBC) data source that opens the Pubs database in Microsoft SQL Server.| 1. | Start Access and open the sample database Northwind.mdb. |
| 2. | Create a module, and then type the following procedure: NOTE: When you use the Visual Basic Editor from within other Microsoft Office 2000 programs, you must first ensure that the Microsoft DAO 3.6 object library is included in your References.
|
| 3. | To test this procedure, type the following line in the Immediate window, and then press ENTER: NOTE: Substitute your own username, ODBC data source name and password for the UID, DSN, and optional Password arguments in the following example:
ConnectAndAddRecords "UID","DSN","Password"
|
Run-time Error '3027': Cannot update. Database or object is read-only.
本文提供了一种在Microsoft Access中使用VBA连接外部ODBC数据源并添加记录的方法,但遇到“数据库或对象为只读”的运行时错误3027。通过示例代码详细展示了如何创建ODBC连接及可能的解决方案。
2545

被折叠的 条评论
为什么被折叠?



