arvids Posted January 18, 2005 Posted January 18, 2005 I have done some searching here but can not find any help... I want to use a db (FMP 7) to collect scanned documents in pdf-format. I am thinking along the lines of embedding the files, and when the db reaches around 600MB I'll make a backup on CD for the archive. This all seem to work ok But then I wanted to be clever, and have a field in every record with the imported file's file size, as well as a total current file size indicator. Sounded easy enough! I have tried using a field with "Get ( FileSize )" and then have a new record's file size minus the previous one's in a calculation... But as far as my trials show, the calculation field with Get ( FileSize ) does not update correctly. Anyone that have got this to work and care to enlighten me? Since the actual db size will increase a little, with every record, my calculation would not really give each embedded file's exact size, but that is not really a problem, since I just roughly want to know the size and finally get an indication when it's time to make a back-up Thanks a bunch in advance!
Søren Dyhr Posted January 18, 2005 Posted January 18, 2005 But as far as my trials show, the calculation field with Get ( FileSize ) does not update correctly. ...and you havn't made the field stored/indexed, say by making it foreign key or such?: --sd
arvids Posted January 18, 2005 Author Posted January 18, 2005 No, not stored/indexed... but I don't really understand what you mean by foreign key? It seems like if I import a file, say 10MB, and then erase that record... The file size field will just not update to reflect that the file have shrunk with those 10MB, in fact nothing happens. Not even when I import a number of smaller files. I'm clueless!!?
-Queue- Posted January 18, 2005 Posted January 18, 2005 Have you set it as unstored via 'Do not store calculation results'?
arvids Posted January 18, 2005 Author Posted January 18, 2005 Yes I have. And I get a weird feeling that it updates, but definitely not regularely. When I left the define fields dialog, and fliped the records back and forth, it updated. But when I tried to repeat the same thing, it does not reflect imported, resp. deleted records... Unless I import a very big file, then I will see an increase in size. However, if I erase that big file, no change.
transpower Posted January 18, 2005 Posted January 18, 2005 That's because FM does not automatically compress itself. You can compact the file (with Developer) and you would then see the difference in size.
arvids Posted January 18, 2005 Author Posted January 18, 2005 So Transpower, if I understand your post correct, the calculation "get ( filesize )" can not be used to monitor the continous change in file size, while adding or deleting files in a db? Would there be any other way??
transpower Posted January 19, 2005 Posted January 19, 2005 Get ( filesize ) would show an increase, but not a decrease, unless you compacted the file. Just another reason to get Developer...
arvids Posted January 19, 2005 Author Posted January 19, 2005 Hmmm - well I have access to Developer, but I guess you mean that this would only work when actually handeling files in a db within Developer?? Would it be possible to script a "compact file" step, or maybe that would be painfully slow... if even possible. Many questions, sorry about that
Recommended Posts
This topic is 7618 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now