当我在Exact Online上执行以下查询时:
use 450*** /* Replace anonymized *** by last three digits of division. */
set use-http-disk-cache false
set use-http-memory-cache false
select * from ExactOnlineREST..DocumentAttachmentFiles where id = to_guid('8b60ccb6-e89d-4397-a4ca-001d6f57a4eb')
我收到一个错误:
itgenoda074: Uw sessie is verlopen. Meld je opnieuw aan. [Session expired]
itgenoda074: Not authenticated. Request to 'https://start.exactonline.nl/docs/SysAttachment.aspx?ID=8b60ccb6-e89d-4397-a4ca-001d6f57a4eb&_Division_=450***' gave response from 'https://start.exactonline.nl/docs/SysAccessDenied.aspx?Mode=128&_Division_=450***'.
这既会在长时间会话后直接发生,也会在登录后直接发生,因此令牌仍然有效。
如何使用无敌 SQL 访问文档?
我拥有拥有公司的精确在线环境的所有权限。
以下内容无济于事,因为它是递归 API 调用(从文件元数据到实际 blob(:
set ignore-http-403-errors false
但是,在递归检索实际二进制 blob 期间,可以忽略任何错误:
set ignore-document-download-errors true
之后,运行以下查询以确定与附件关联的文档 ID:
select document from ExactOnlineREST..DocumentAttachmentFiles where id = to_guid('8b60ccb6-e89d-4397-a4ca-001d6f57a4eb')
并将文档 GUID 放入以下查询中:
select * from exactonlinerest..documents where id=to_guid('VALUE FROM PREVIOUS QUERY')
您可能会检索 0 行。有时,文档附件文件继续存在,而文档不再可用。
如果是这样,请自行向Exact Online报告。其 API 应返回引用正确的数据。
如果没有,请扩展您的问题。