VERIFIED SOLUTION i
X

How to run multiple DatabaseSearch() to get more data against an Account/Document in EngageOne Vault

UPDATED: November 9, 2017


Following is the code snippet to setup the continues-parameters to get more data:

##############################
#For Customer / Account indexes :
#

RenderClient2 client=new RenderClient2("127.0.0.1", 6003);

client.connect();

e2IndexList idxl = client.DatabaseInfo("mydb");

e2Index acctidx=idxl.GetIndex("account");

e2SearchParameters2 param2 = new e2SearchParameters2();

param2.searchmode = e2SearchMode.GENERIC;

param2.dbname = dbname;

param2.SetIndex(acctidx.indexno, acctidx.flags);

param2.maxresult = 100;

param2.first="";

param2.prefix="123";

int moredata=0;

while(true)

{ e2SearchList2 sl2 = client.DatabaseSearch(param2, out moredata); if(sl2==null) break; int size = sl2.Size(); if(size==0) break;//empty data //use the data ... if(moredata==0) break;//no more data //more data : get the last one for next search e2SearchData2 sdlast=sl2.get(size-1); param2.first=sdlast.metched; }

client.close();

##############################
#For document list :
#

int moredoc=0;

String dbname="mydb";

String account="1234";

String date="";

int max=100;

while(true)

{ e2DocumentList doclist=client.DocumentList(dbname, account, date, max, out moredoc); if(doclist==null) break; int size=doclist.size(); if(size==0) break;//empty data //use data .... if(moredoc==0) break;//no more data //get the last one for next search e2Document doc = (e2Document)doclist.Get(sizedoc - 1); date=doc.date; }


 

Downloads

  • No Downloads