如何用Notes C++ API从Notes的数据库中查找对应的纪录?(LOTUS社区解惑月500分悬赏贴)
500分发放将会以捐分的形式送出,请各位届时查收:)
原贴内容:
我使用Notes C++ API为什么不能查找出Sent文件夹下的email。代码如下:
LNNotesSession session;
LNDatabase db;
LNViewFolder view;
LNVFEntry foundEmail;
LNDocument doc;
LNVFFindOptions options;
...
session.Init();
session.GetMailDatabase(&db);
db.open();
cout << "PASS 1: Opened Mail database:" << db.GetTitle() << endl;
db.GetViewFolder("$Sent", &view);
if (0 == view.Open())
{
cout << "PASS 2: Open the view folder" << view.GetName() << endl;
}
else
{
cout << "FAIL: can not open the view folder" << endl;
}
options.SetComparison(LNVFCOMPARISON_EQ);
options.SetMatchWholeWord(true);
LNSTATUS found = view.Find("test", &foundMail);
if (0 == found)
{
cout << "PASS 3: Found Mail" << endl;
}
else
{
cout << "FAIL: Mail not found" << endl;
}
view.Close();
db.Close();
...
session.Term();
运行输出结果是:
...
PASS 1: Opened Mail database: xxxx
PASS 2: Open the view folder ($Sent)
FAIL: Mail not found
...
不知道我上面这段代码那里出现的问题?或是Notes的其他配置有关?谢谢各位
原发贴者ID:sitnc
注:次问题由sitnc提出,我们将与2007年6月21日~2007年7月6日之间举行“LOTUS社区解惑月”活动,欢迎大家踊跃参加,有效回答者将分享此500分,最佳回答者将得由第二书店提供的100元购书代金卷一张,详情请看活动页面:http://events.csdn.net/ibm/jhy/