使用ucanaccess控制台我收到错误:UCAExc ::: 3.0.2用户缺少权限或找不到对象:DBO_TBLMATERIALS

时间:2015-11-19 01:58:02

标签: ucanaccess

我已经阅读了这个问题的其他实例,根据答案,我已经确认所有内容都拼写正确并且我已经运行了压缩和修复工具。

我尝试访问的表是一个链接表,正如您所看到的,它并未列为已加载。如果我从其中一个非链接表中选择,则查询成功。

任何帮助都将不胜感激。

这是控制台输出:

C:\Temp\UCanAccess-3.0.2-bin>console.bat
Please, enter the full path to the access file (.mdb or accdb): C:\Work\Jira\SAP\SandboxDB.ACCDB
Loaded Tables:
Category List, Table1, Table2, Table3, Table4, Temp
Loaded Queries:

Loaded Indexes:
Primary Key  on Table3 Columns: (ID)
, Primary Key  on Table4 Columns: (ID)
, Primary Key  on Temp Columns: (ID)
, Index on Temp Columns: (ID)

UCanAccess>
Copyright (c) 2012 Marco Amadei
UCanAccess version 3.0.2
You are connected!!
Type quit to exit

Commands end with ;

use:
   export <pathToCsv>;
for exporting into a .csv file the result set from the last executed query

UCanAccess>select * from dbo_tblMaterials;
UCanAccess>UCAExc:::3.0.2 user lacks privilege or object not found: DBO_TBLMATERIALS

UCanAccess>

1 个答案:

答案 0 :(得分:0)

名为[dbo_tblMaterials]的Access链接表几乎肯定是指向SQL Server表的 ODBC 链接表。 UCanAccess使用Jackcess来读取和写入Access数据库文件,而Jackcess不支持读取ODBC链接表。

如果您确实需要在Access中读取/写入ODBC链接表(而不是直接连接到SQL Server),那么您可能必须使用C#构建应用程序并使用System.Data.Odbc