我安装了clear quest 7.1.2。
表单中有一个名为“attachments”、类型为 ATTACHMENT_LIST 的字段
我尝试使用 java 获取附件。
...
CQEntity实体=_cqsession.GetEntity("id",rs.GetColumnValue(0));
System.out.println(entity.GetFieldValue("附件"));
...
结果如下
45462489
A.docx
7517688
44348818
B.doc
1076224
谁能帮忙提供一些java示例来获取这些附件的位置,然后下载它们?
最佳答案
我通过搜索网络找到了解决方案。 https://www.ibm.com/developerworks/community/forums/html/topic?id=77777777-0000-0000-0000-000014162725
它是用 perl 编写的
use CQPerlExt;
my $u_session = CQSession::Build();
$u_session->UserLogon("username", "password", "CQ_DBNAME", "CQ_DBSET");
$entity = $u_session->GetEntity("CQ_DBNAME", "00000344");
$attachfields = $entity->GetAttachmentFields();
$attachfield1 = $attachfields->Item(0);
$attachments = $attachfield1->GetAttachments();
$numattachments = $attachments->Count();
for ($x = 0 ; $x < $numattachments ; $x++)
{
$attachment = $attachments->Item($x);
$filename = $attachment->GetFileName();
$status = $attachment->Load("C:\\".$filename);
}
关于java - 如何使用java从clear quest下载附件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27766083/