如何为 Datafactory 从 Access DB 读取指定 "read-only"

How to specify "read-only" for Datafactory reading from an Access DB

我正在尝试从 Microsoft Access 数据库中提取数据。访问数据库似乎被其他人使用,不属于 me/my 团队。我纯粹是取出数据,所以我设置的用户不需要写权限,但我不确定如何在 Access 连接字符串中设置它。

在本地机器上设置集成运行时,在设置 Access DB 链接服务时,我使用以下连接字符串:

Driver={Microsoft Access Driver (*.mdb, *.accdb)};Dbq=\hostserver\filepath\filename.accdb;

我试过附加“applicationintent=readonly”、“mode=read”、“admode=read”和其他几个变体,但总是收到“无效的连接字符串属性'mode'”的错误。如果未指定,我会收到:

ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key Temporary (volatile) Ace DSN for process 0x3070 Thread 0x326c DBC 0xb81000b8 Jet'. ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key Temporary (volatile) Ace DSN for process 0x3070 Thread 0x326c DBC 0xb81000b8 Jet'. ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver] The Microsoft Access database engine cannot open or write to the file '(unknown)'. It is already opened exclusively by another user, or you need permission to view and write its data.

我想出了如何正确连接,只读不是问题,而且我从来没有弄清楚如何指定它。如果您正在努力从数据工厂连接到 Access 数据库,请参阅此 link: