January 21, 201213 yr FMP databases contain tables ... and each table contains records. But records can differ markedly in size according to the current contents of individual fields ... most notably, text fields and containers. Is there any way to Get Size(Record N)? ... without having to add up the sizes of the individual fields (which can be dozens). Thanks in advance for any assistance.
January 21, 201213 yr Um..why? And, you should investigate storing references to files in containers.
January 21, 201213 yr Author My objective is a quick database analysis tool ... that can operate at a high level to spot problematic records where, for example, the user has placed 50 pages of text in an "allow override" field. Yes, containers are an even bigger problem to manage ... and I'm working on that right now. So, any ideas on a simple Get Size?
January 21, 201213 yr The Length() function will return the number of characters in a field, which might be a good approximation to the field's storage "size" but this does not take unicode or formatting into account. If you are worried about 50 pages of text in an allow override field, then use field level validation and/or auto-enter calculations to limit the data entered and clean it up if necessary. Otherwise you might find that your efforts to "solve" future problems become usability problems, because users always find ways of using a database to solve their problems that the developer never dreamed of (or intended).
January 22, 201213 yr I understand your goal and I believe it is a worthy one. At one time, I attempted something similar. All I could think to do was create an empty clone and look at the file size then manipulate, add/delete records and then reading file size again. The purpose was to find out how much bloat could occur depending upon how I set field indexing. I do not have an answer either. If time, I will try to consider it further. In meantime, I will watch this thread as well. Thank you for bringing this up. :`)
Create an account or sign in to comment