我正在尝试从 Microsoft Access 数据库中提取数据。访问数据库似乎被其他人使用,不属于我/我的团队。我纯粹是在取出数据,所以我设置的用户不需要写访问权限,但我不确定如何在 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.