Home
Extended ECM
API, SDK, REST and Web Services
Sample for LL_ApplyQuery in VB
Richard_Ma_(mtrcadmin_-_(deleted))
Any Sample for LL_ApplyQuery in VB.Thanks a lot
Find more posts tagged with
Comments
***_****_(citlon01admin_-_(deleted))
Dim lAccessEnterpriseWS As Long lStatus = LL_ValueAlloc(lAccessEnterpriseWS) lStatus = LL_AccessEnterpriseWS(lSession, lAccessEnterpriseWS) Dim ParentId As Long lStatus = LL_AssocGetInteger(lAccessEnterpriseWS, "ID", ParentId) Dim vSelectlist As Long ' //Define value objects lStatus = LL_ValueAlloc(vSelectlist) lStatus = LL_ValueSetList(vSelectlist) ' //Set up the list of fields for ApplyQuery to return lStatus = LL_ValueSetLength(vSelectlist, 2) ' //Note: OTObject must be in this list for ApplyQuery to work lStatus = LL_ListSetString(vSelectlist, 0, "OTName") ' //Object Name lStatus = LL_ListSetString(vSelectlist, 1, "OTDataID") '//The objects ID 'lStatus = LL_ListSetString(vSelectlist, 2, "OTObject") 'lStatus = LL_ListSetString(vSelectlist, 3, "OTOwnerID") '//The objects VolumeID Dim Where As String Where = "(""Attr_140510_2"" : ""9999"")" Dim queryResults As Long lStatus = LL_ValueAlloc(queryResults) lStatus = LL_ApplyQuery(lSession, ParentId, vSelectlist, Where, LL_SORTBYNOTHING, "", 0, 10, "LivelinkQueryLanguage", queryResults)
***_****_(citlon01admin_-_(deleted))
Dim listBrokers As Long lStatus = LL_ValueAlloc(listBrokers) lStatus = LL_ValueSetAssoc(listBrokers) lStatus = LL_ValueSetList(listBrokers) lStatus = LL_GetSearchBrokers(lSession, listBrokers) Dim intNumberofBrokers As Long lStatus = LL_ValueGetLength(listBrokers, intNumberofBrokers) 'lStatus = LL_ListGetType(listBrokers, 1, intNumberofBrokers) Dim lAssoc As Long Dim intNodeID As Long Dim strNodeName As String Dim IntLoop As Long lStatus = LL_ValueAlloc(lAssoc) IntLoop = 0 Do Until Left(buf, siz) = "Enterprise" lStatus = LL_ListGetValue(listBrokers, IntLoop, lAssoc) lStatus = LL_AssocGetInteger(lAssoc, "NodeID", intNodeID) lStatus = LL_AssocGetString(lAssoc, "NodeName", buf, 255, siz) IntLoop = IntLoop + 1 Loop Dim vSelectlist As Long ' //Define value objects lStatus = LL_ValueAlloc(vSelectlist) lStatus = LL_ValueSetList(vSelectlist) ' //Set up the list of fields for ApplyQuery to return lStatus = LL_ValueSetLength(vSelectlist, 4) ' //Note: OTObject must be in this list for ApplyQuery to work lStatus = LL_ListSetString(vSelectlist, 0, "OTDataID") '//The objects ID lStatus = LL_ListSetString(vSelectlist, 1, "OTName") ' //Object Name lStatus = LL_ListSetString(vSelectlist, 2, "OTObject") lStatus = LL_ListSetString(vSelectlist, 3, "OTOwnerID") '//The objects VolumeID Dim Where As String Where = "(Attr_140510_2 : 9999)" 'Where = "(OTSubType : 144)" 'Where = "test*" Dim queryResults As Long lStatus = LL_ValueAlloc(queryResults) 'lStatus = LL_ValueSetList(queryResults) lStatus = LL_ApplyQuery(lSession, intNodeID, vSelectlist, Where, 0, "", 0, 10, "LivelinkQueryLanguage", queryResults) 'lStatus = LL_ApplyQuery(lSession, intNodeID, vSelectlist, Where, 0, "", 0, 10, "None", queryResults) Dim intNumberofReturns As Long lStatus = LL_ValueGetLength(queryResults, intNumberofReturns) For IntLoop = 0 To intNumberofReturns - 1 lStatus = LL_ListGetValue(queryResults, IntLoop, lAssoc) lStatus = LL_AssocGetString(lAssoc, "OTDataID", buf, 255, siz) Debug.Print Left(buf, siz) lStatus = LL_AssocGetString(lAssoc, "OTName", buf, 255, siz) Debug.Print Left(buf, siz) Next IntLoop