Thats a negative. No documentation. Built like this for performance reasons I'm told.
That doesn't surprise me. You've definitely got your work cut out.
Yes it's great to do everything in memory and this is what I do in Excel but working this way in what is supposed to be a relational db is a pitta.
The relational model is reflected in the UDTs.. for example:
A UDT is not really a relational model, it's not even a model. What you see is a record (TMailCheck) of a record(TMailbox) of a record(TMailboxes). UDTs can be used as a data structure for holding a single record or it can be used to hold items that don't even relate to each other. So in your case think of a UDT as a bunch of variables that hold data for one record alone.
Yes, record searching is done on the array.
I'm surprised that faster collections for storing the UDTs like Collections or Dictionaries were not even implemented.
How is the search actually done? It loops through each row and each column looking for a match? And have they employed any searching and sorting algorithm like binary search or bubble sort.
I have never seen UDT's until I joined here. Are they commonly used? I rarely see them mentioned on here. I have used classes for some projects I have built but in general I have not needed to.
Yes, if you've used classes then you would have come across Types. In a class in VBA you have a constructor/destructor, you can instantiate multiple instances of a class but with Types you don't instantiate and if memory serves me right Types can't be passed ByVal.
There are a couple of applications here that read text files which come in various formats, so I can see the benefit of loading configurations in to UDT's as the source data is fixed. This is drifting off topic slightly but am still very interested in your views on how everything is built here.
That's right and that's why it's absolutely acceptable to do that for a flat file structure, but then again it depends on the intended use of the data. Are they doing this through a WAN?
Basically the main advantage of using a type is so that you can identify which field belongs to which value but if you're going to do this for every record it's just a waste. The retrieve the value from an array all you need is the ordinal position. Since the variables in the UDT already define the field names why not just store the ordinal position there and store a dimensioned array.
In any case winshent I think they've thrown Access out the window and gone back to Excel. They might as well store the tables in a spreadsheet and read off the values from there and store in memory.
Another issue they'll face is if a new field is created it means any change to the table must also be reflected in code.