Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2004
    Posts
    15

    Unanswered: DB Size of MS Access

    I have a field( text type) of fileld length =250 in a table. If the actual data contained in this field is 10 characters will the data base still consume 250 byte or it will consume according to the actual data in it ( in this case 10 bytes).

    Regards

    VK Aggarwal

  2. #2
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    It will consume 250

  3. #3
    Join Date
    Nov 2004
    Posts
    34
    Well I can only speak for Access 97 as that is what I have in front of me, but this should apply for roughly for all versions of Access. The fact that when a Access database is created it contains system tables anyway. So a database with no (excluding system tables) tables or forms, etc in it will still be about 59, 392 bytes in size. Although, regarding your question, adding a table with one field (250 bytes in size) but with no data adds no weight to the overall database size. However, once you've entered data (I entered a 10 byte string) into that table the db size leaps to 67, 584 bytes. If you then enter a text string 250 bytes long, it stays at 67, 584 bytes. So it does seem that Access reserves the 250 bytes set aside for that field, but only after data has been entered into that field. Hope this answer your question. May I ask as to why you are so worried about such small differences in file size?

  4. #4
    Join Date
    Dec 2004
    Posts
    15
    My data base consists of a table which has large number of text fields. Though the actaual data will be about 30-40 characters per field on an average but once in a blue moon it can be as long as 240 characters in any of thses text fields . Keeping worst case scenario in mind, the record size is comming to be about 15000 bytes. I also know the expected growth rate of the number of records in the table. If the data base will consume maximum size irrespective of actual data, then on Access 97, it may suffice only for 2-3 years, which is my worry

    Regards

    vk aggarwal

  5. #5
    Join Date
    Nov 2004
    Posts
    34
    If this data is being entered through a form, there is a VBA function that would resize the data size of a field so, for example, after the data has been entered in the textbox on a form, the code would run to see whether the entered string is bigger than the current field size, and if it is, it simply re-adjusts the field size to accomodate.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •