' to process each of the returned values in the array. '*** Not Sure How *** right here but need a loop 'Need to handle valuelist as a string array System.DebugLog("-Value ("+results(0).Value(mykey).StringValue+")")Įlseif valuelist.Type = variant.TypeArray then If valuelist.Type = Variant.TypeString then System.DebugLog("Key (" + results(0).Key(i).StringValue + ")")ĭim valuelist as Variant = results(0).Value(mykey) If the delimiter is an empty string, the source string is Split into characters. If the optional parameter, delimiter, is not passed, a single space is assumed as the delimiter. 'System.DebugLog("Key (" + results(0).Key(i).StringValue + _ Use the Split function to create a new String array from a list of elements (or fields) that are separated by a delimiter. ' not zero since the key in element zero is always nil. The customer object would reference the objects either in an array or the same type of dictionary just containing references back to the main order dictionary. 'Loop the keys value pairs starting with 1 L.SimpleBind("AD\" + Session.ServAcctID, Session.ServAcctPW)ĭim results() as Dictionary = l.Search(BaseDN, Scope, Filter) That all works but I just need to process the return values that are variant arrays. Parts of the code below is essentially copied from the MBS LDAP demo program. I test for a returned dictionary array and treat it as an error elsewhere in the code after doing the MBS LDAP search.Ĭan somebody put the function above to re-cast the variant array to a string array in context in a little code where I would loop through the value array? Some of the entires in the Dictionary are Double values. When I want to reimport this data back into the Dictionary with all works pretty well. Note that the dictionary returned is also an array of dictionaries (hence the subscript for results(0) below) but I don’t get but one dictionary returned (element zero). I am using and saving the data inside the Dictionary as a JSON file. I have that working but I cannot quite get my head wrapped around the solution mentioned by Will (above) in this thread to handle value arrays returned in the dictionary.Įssentially I have a loop with a set of keys in a dictionary returned by the MBS function but a few of the keys return values as variant arrays not just a simple string. I am attempting to use the MBS LDAP Search.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |