Hi John;
Well ... if memory serves me correctly (no pun intended here - LOL), that information is not well documented anywhere AFAIK. However, I do have a "sneaky" way to find out if you have some spare coding time. The DW object will actually give you that information via the command:
- .Object.DataWindow.Storage // OR
- .Describe("DataWindow.Storage")
Now what you would need to do is create one "external" DW object with one row and one column of the datatype from your question ... say for example "Decimal". Then at run time load the DWO and perform an InsertRow(0) plus SetItem(1, ). Then request the DWO to give up its used storage via the above command. That would now tell you the over-head of what a DWO does to handle one decimal value.
For example:
The above approach would not work though for native variables. You would have to instantiate say a Decimal variable and perform a "GlobalMemoryStatusEx" MS-Windows API call just before and after the variable type instantiation. The delta of course would be the native memory consumption for that variable type.
Sorry for that little bit of a long winded answer.
HTH
Regards ... Chris
In general, inserting the first row incurs a non-trivial increase in storage use of approx. 1700-2700 bytes varying between the datatype of column object and presentation (visual vs. non-visual) , which is, I suppose, understandable. Subsequent row additions consistently increased storage use by a fairly small amount (in the range of 104-120 bytes, depending on the datatype). I also compared storage use when adding a row without setting a value versus performing a SetItem after the InsertRow. I cannot draw any definitive conclusions from the results, and I'm doubtful that a standard datatype such as Decimal, Date, Time, & Datetime require 104-120 bytes of memory.
I will look into your suggestion on using the GlobalMemoryStatusEx Windows API tomorrow evening. Thanks again for the suggestions!
Thanks for that feedback and your hard work ... very interesting!