Results 1 to 7 of 7
  1. #1
    New Lounger
    Join Date
    Jun 2004
    Location
    Banglamung, Thailand
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Field Size Limit (2002 (10.4302.4219) SP-2)

    Can anyone advise how I can overcome the limit on the field size of 255? I have a database which would be nice in one of the fields to increase this to say 500

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

    Re: Field Size Limit (2002 (10.4302.4219) SP-2)

    Welcome to Woody's Lounge.

    Use a memo field instead of a text field. Memo fields can hold text of virtually unlimited length.

    Note: don't set a format on memo fields; this will truncate the displayed length to 255.

  3. #3
    4 Star Lounger
    Join Date
    Aug 2002
    Location
    Dallas, Texas, USA
    Posts
    594
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Field Size Limit (2002 (10.4302.4219) SP-2)

    As Hans pointed out, you should use a Memo field. They are technically able to hold as much data as the .mdb itself can hold.

    However, Memo fields are not indexable, not in 2k and below. In 2002 and up (I believe), they are indexable, however, only the first 255 characters are indexed. So if you need to keep all of the data indexed, why not just create two text fields. It would require a little extra work to use two fields 'as one', but certainly not too much extra work.

  4. #4
    Star Lounger
    Join Date
    Dec 2001
    Location
    Houston
    Posts
    71
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Field Size Limit (2002 (10.4302.4219) SP-2)

    "Virtually" unlimited length? Actually, the length limit appears to be 64K, which for my purposes is not long enough -- I need to store HTML scraped from web pages, and some exceed the 64K limit, which is causing me grief. If you only need 1/2K, this is no problem, but be advised that there is indeed a limit.

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

    Re: Field Size Limit (2002 (10.4302.4219) SP-2)

    If you need to store that much in a field, you need an OLE field. More work to get the data into and out of it, but a 1 GB (GigaByte) size limit.

    BTW, I have never needed it, but I probably would store that much data in external files, and store the file name in the database.

  6. #6
    4 Star Lounger
    Join Date
    Aug 2002
    Location
    Dallas, Texas, USA
    Posts
    594
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Field Size Limit (2002 (10.4302.4219) SP-2)

    That only a limit when entering through the datasheet of a table, or a form view. If you interact with a memo field using ADO or DAO (with code), a memo field can hold up to the size limit of the database itself. The '64k' imposed limit is actually a limitation in the viewing capabilities within the datasheet view.

  7. #7
    Bronze Lounger
    Join Date
    Nov 2001
    Location
    Arlington, Virginia, USA
    Posts
    1,394
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Re: Field Size Limit (2002 (10.4302.4219) SP-2)

    In reference to this issue, and the other related thread (<!post=Post 372770 - Access-VBA code to read web pages,372770>Post 372770 - Access-VBA code to read web pages<!/post>), my recommendation would be to save the source code in the text files (which is necessary anyway) and save just the path to the text file in Access. As others noted, it seems that an Access textbox on form, or table in datasheet view, refuses to display more than appx 64,000 characters - you just get the "Text too long to be edited" msg. See attached file, revised copy of the demo database that was attached to post cited above. The revised form (frmHTML_REV) can still be used to download URL source code to text file. The textbox used to display source code is now unbound; if text file less than 64,000 characters in length, the "Display Text File" button will open file as Textstream object and display in textbox. The recommended option is, to click the "Open Text File" button (Notepad icon) which uses ShellExecute function to open text file in Notepad (or whatever application is associated with text files on Windows system in use). Then the text length should not be an issue. You can always modify the ShellExecute command to open text file with Word or another program, if desired. If you have a dedicated folder for saving downloaded files, you can modify form so folder path is default for new records, etc. Note: attached demo is A2K format.

    HTH
    Attached Files Attached Files

Posting Permissions

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