Results 1 to 7 of 7
  1. #1
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Byte and Integer fields in tables (Access 2003 SP3)

    Are there any advantages/disadvantages using the Byte and Integer types in number fields in tables? I am talking whole numbers and not fractions.

    With systems being 32 bit these days i would have thought using Long Integer fields would be the way to go?

    I have been using Long Integer for years.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Byte and Integer fields in tables (Access 2003 SP3)

    If you have tables with millions of records, the database will be smaller if you use Byte or Integer fields instead of Long Integer fields. Disk space is usually not a problem these days, but if users have to work with the database over a slow connection it might make a difference.

    I generally use Long Integer fields too, though.

  3. #3
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Byte and Integer fields in tables (Access 2003 SP3)

    There is one difference that is worth remembering if you use Bytes. Bytes cannot hold negative values, the other two can.
    Regards
    John



  4. #4
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Byte and Integer fields in tables (Access 2003 SP3)

    I would have thought the packing/unpacking into byte and integer fields may impact speed too.

    Thanks for that.

  5. #5
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Byte and Integer fields in tables (Access 2003 SP3)

    Good one, i thought it held +/- 127 as a maximum, the things I learn, Thanks John.

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Byte and Integer fields in tables (Access 2003 SP3)

    There are CPU-level instructions for that, so overhead should be minimal.

  7. #7
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Byte and Integer fields in tables (Access 2003 SP3)

    Thanks for that.

Posting Permissions

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