Database.Search 和 View.GetAllDocumentByKey
2010-10-21 10:10
405 查看
Database.Search
这里的strSearch即在View中的View Selection Formula:
以上dc的结果就相当于下面公式
SELECT Form="Example" & FormName="Example" & Doc_State!="Deleted" & @Date (CreationDate)=@Today
得到的View中的所有Document的集合。
View.GetAllDocumentByKey
这里的"SearchKey"是要搜索的关键字内容,一般是看View中文档的第一列的内容是否匹配,True指完全匹配,False指不完全匹配。
特别说明:搜索列必须设置为排序格式,即Column属性Sort不为None。
Dim sess As New NotesSession Dim db As NotesDatabase Dim strSearch As String Dim dc as NotesDocumentCollection Set db = sess.CurrentDatabase strSearch = {Form="Example" & FormName="Example" & Doc_State!="Deleted" & @Date(CreationDate)=@Today } Set dc = db.Search(strSearch,Nothing,0)
这里的strSearch即在View中的View Selection Formula:
以上dc的结果就相当于下面公式
SELECT Form="Example" & FormName="Example" & Doc_State!="Deleted" & @Date (CreationDate)=@Today
得到的View中的所有Document的集合。
View.GetAllDocumentByKey
Dim sess As New NotesSession Dim db As NotesDatabase Dim vw As NotesView Dim dc As NotesDocumentCollection Set db = sess.CurrentDatabase Set vw = db.GetView("Example") Set dc = vw.GetAllDocumentByKey("SearchKey",True)
这里的"SearchKey"是要搜索的关键字内容,一般是看View中文档的第一列的内容是否匹配,True指完全匹配,False指不完全匹配。
特别说明:搜索列必须设置为排序格式,即Column属性Sort不为None。
相关文章推荐
- view.getdocumentbykey查询速度非常慢
- getalldocumentbykey得到文档顺序问题
- NotesView.GetAllDocumentsbyKey 与 NotesView.GetAllEntriesbyKey的区别
- document.all与getElementById、getElementsByName、getElementsByTagName用法区别-document.all第1/2页
- document.all还是document.getElementsByName?
- document.all还是document.getElementsByName
- document.all还是document.getElementsByName?
- document.all还是document.getElementsByName?
- document.all还是document.getElementsByName?
- document.all还是document.getElementsByName?
- document,document.all,getElementById,getElementsByName,getElementsByTagName
- document,document.all,getElementById,getElementsByName,getElementsByTagName
- document.all还是document.getElementsByName?
- document.all还是document.getElementsByName?
- document,document.all,getElementById,getElementsByName,getElementsByTagName
- document,document.all,getElementById,getElementsByName,getElementsByTagName
- document.all与getElementById、getElementsByName、getElementsByTagName用法区别-getElementById
- document_all还是document_getElementsByName
- javascript:document.all & document.getElementsByName
- document.all与getElementById、getElementsByName、getElementsByTagName用法区别-document.all