Maximum bytes that can be stored in a string variable?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Lauren Wilson

    Maximum bytes that can be stored in a string variable?

    Access 2K

    dim MyStr as string

    What is the maximum amount of text or bytes that this variable can
    store? Does anyone know?
  • Tom van Stiphout

    #2
    Re: Maximum bytes that can be stored in a string variable?

    On Tue, 10 Aug 2004 22:35:29 -0500, Lauren Wilson <???@???.com> wrote:

    Very large, but in my testing strangely unpredictable. I expected 2^32
    - 1, but that was not the case.

    Here is the test code I ran:
    Sub Test()
    Dim s As String
    Const EXPONENT As Integer = 28
    s = String$(2 ^ EXPONENT - 1, 65)
    Debug.Print EXPONENT, Len(s)
    End Sub

    For values of EXPONENT greater than 28 I received an Out Of String
    Space error. Still, at least 268 million characters - hopefully that's
    enough?

    -Tom.

    [color=blue]
    >Access 2K
    >
    >dim MyStr as string
    >
    >What is the maximum amount of text or bytes that this variable can
    >store? Does anyone know?[/color]

    Comment

    • Lyle Fairfield

      #3
      Re: Maximum bytes that can be stored in a string variable?

      Lauren Wilson <???@???.com> wrote in news:hs4jh01gq5 4kg2nn61pl0u3qd oma2m90qa@
      4ax.com:
      [color=blue]
      > Access 2K
      >
      > dim MyStr as string
      >
      > What is the maximum amount of text or bytes that this variable can
      > store? Does anyone know?[/color]

      42

      --
      Lyle
      --
      use iso date format: yyyy-mm-dd

      --
      The e-mail address isn't, but you could use it to find one.

      Comment

      • david epsom dot com dot au

        #4
        Re: Maximum bytes that can be stored in a string variable?

        "A variable-length string can contain up to approximately 2 billion
        characters."
        That's 2 Gigabyte. I don't know what happens with Unicode.

        (david)

        "Lauren Wilson" <???@???.com> wrote in message
        news:hs4jh01gq5 4kg2nn61pl0u3qd oma2m90qa@4ax.c om...[color=blue]
        > Access 2K
        >
        > dim MyStr as string
        >
        > What is the maximum amount of text or bytes that this variable can
        > store? Does anyone know?[/color]


        Comment

        • VRWC

          #5
          Re: Maximum bytes that can be stored in a string variable?


          That should be plenty. I thought maybe running out of string space
          was causing the error I'm getting from pasting about 200K characters
          into a text box bound to a memo field. When I arrive on such records
          and place the cursor into the text box, I get a message that says
          "text too large to be edited".

          Any clues?


          On Tue, 10 Aug 2004 20:59:55 -0700, Tom van Stiphout
          <no.spam.tom774 4@cox.net> wrote:
          [color=blue]
          >On Tue, 10 Aug 2004 22:35:29 -0500, Lauren Wilson <???@???.com> wrote:
          >
          >Very large, but in my testing strangely unpredictable. I expected 2^32
          >- 1, but that was not the case.
          >
          >Here is the test code I ran:
          >Sub Test()
          >Dim s As String
          >Const EXPONENT As Integer = 28
          >s = String$(2 ^ EXPONENT - 1, 65)
          >Debug.Print EXPONENT, Len(s)
          >End Sub
          >
          >For values of EXPONENT greater than 28 I received an Out Of String
          >Space error. Still, at least 268 million characters - hopefully that's
          >enough?
          >
          >-Tom.
          >
          >[color=green]
          >>Access 2K
          >>
          >>dim MyStr as string
          >>
          >>What is the maximum amount of text or bytes that this variable can
          >>store? Does anyone know?[/color][/color]

          Comment

          • Lauren Wilson

            #6
            Re: Maximum bytes that can be stored in a string variable?

            On Wed, 11 Aug 2004 15:56:46 +1000, "david epsom dot com dot au"
            <david@epsomdot comdotau> wrote:
            [color=blue]
            >"A variable-length string can contain up to approximately 2 billion
            >characters."
            >That's 2 Gigabyte. I don't know what happens with Unicode.[/color]

            Exactly what IS Unicode? I've never understood it.
            [color=blue]
            >(david)
            >
            >"Lauren Wilson" <???@???.com> wrote in message
            >news:hs4jh01gq 54kg2nn61pl0u3q doma2m90qa@4ax. com...[color=green]
            >> Access 2K
            >>
            >> dim MyStr as string
            >>
            >> What is the maximum amount of text or bytes that this variable can
            >> store? Does anyone know?[/color]
            >[/color]

            Comment

            • david epsom dot com dot au

              #7
              Re: Maximum bytes that can be stored in a string variable?

              > Very large, but in my testing strangely unpredictable.
              Yes
              [color=blue]
              > I expected 2^32[/color]
              No: 2^31
              [color=blue]
              > For values of EXPONENT greater than 28[/color]
              I only get 27 on my PC - but that takes my total memory utilisation
              to up around [Physical Memory] + [Page File], and even then I don't
              get instantaneous memory release when the variable goes out of scope,
              so I have to wait before I try it again. Of course, using my hard
              disk for memory slows things down a bit, so I don't plan to use this
              for anything anytime soon even if I can get 2^31 :~).

              (david)

              "Tom van Stiphout" <no.spam.tom774 4@cox.net> wrote in message
              news:dq5jh0521n i4iuqhg6dem2rlu 0l0nbueak@4ax.c om...[color=blue]
              > On Tue, 10 Aug 2004 22:35:29 -0500, Lauren Wilson <???@???.com> wrote:
              >
              > Very large, but in my testing strangely unpredictable. I expected 2^32
              > - 1, but that was not the case.
              >
              > Here is the test code I ran:
              > Sub Test()
              > Dim s As String
              > Const EXPONENT As Integer = 28
              > s = String$(2 ^ EXPONENT - 1, 65)
              > Debug.Print EXPONENT, Len(s)
              > End Sub
              >
              > For values of EXPONENT greater than 28 I received an Out Of String
              > Space error. Still, at least 268 million characters - hopefully that's
              > enough?
              >
              > -Tom.
              >
              >[color=green]
              > >Access 2K
              > >
              > >dim MyStr as string
              > >
              > >What is the maximum amount of text or bytes that this variable can
              > >store? Does anyone know?[/color]
              >[/color]


              Comment

              • david epsom dot com dot au

                #8
                Re: Maximum bytes that can be stored in a string variable?

                Unicode is a standard for text that supports alphabets
                and character sets other than English. It may use 2
                Bytes per character, in which case it may take up more
                space than an English-only encoding like ANSI or ASCII,
                (equivalently, you may be able to store less text in the
                same space).

                Before you store non-English alphabets in a Jet database,
                you should tell Access what kind of alphabet and which
                font you wish to use. Later, when you wish to view the
                data, Access and Windows will look for a compatible
                font.

                This is one way that you can use Sort Orders, Case Rules,
                and Fonts that are very different from English, and Unicode
                is the standard that MS supports.

                (david)

                "Lauren Wilson" <???@???.zip> wrote in message
                news:gqilh09s04 t69lrtaqtq2rjhs t6b62q1ke@4ax.c om...[color=blue]
                > On Wed, 11 Aug 2004 15:56:46 +1000, "david epsom dot com dot au"
                > <david@epsomdot comdotau> wrote:
                >[color=green]
                > >"A variable-length string can contain up to approximately 2 billion
                > >characters."
                > >That's 2 Gigabyte. I don't know what happens with Unicode.[/color]
                >
                > Exactly what IS Unicode? I've never understood it.
                >[color=green]
                > >(david)
                > >
                > >"Lauren Wilson" <???@???.com> wrote in message
                > >news:hs4jh01gq 54kg2nn61pl0u3q doma2m90qa@4ax. com...[color=darkred]
                > >> Access 2K
                > >>
                > >> dim MyStr as string
                > >>
                > >> What is the maximum amount of text or bytes that this variable can
                > >> store? Does anyone know?[/color]
                > >[/color]
                >[/color]


                Comment

                • '69 Camaro

                  #9
                  Re: Maximum bytes that can be stored in a string variable?

                  Hi, Lauren.

                  You are trying to paste too much into the text box. Access 2K has two
                  limits on Memo field size:

                  1.) Maximum number of characters when data is entered through the user
                  interface: 65,535.
                  2.) Maximum number of characters when data is entered programmaticall y: 1
                  GB.

                  You can find these limits, as well as others, by entering the word
                  specifications in Access 2K help.

                  Also, a known cause of Access database corruption is Memo fields being
                  edited through bound text boxes. Using VBA code to input the 200K
                  characters from the text box into the record will accommodate your needs
                  and, hopefully, prevent database corruption.

                  HTH.

                  Gunny

                  See http://www.QBuilt.com for all your database needs.
                  See http://www.Access.QBuilt.com for Microsoft Access tips.


                  "VRWC" <???@???.zip> wrote in message
                  news:jfilh0dl1f ret389klgb8k5i1 mf5bckel4@4ax.c om...[color=blue]
                  >
                  > That should be plenty. I thought maybe running out of string space
                  > was causing the error I'm getting from pasting about 200K characters
                  > into a text box bound to a memo field. When I arrive on such records
                  > and place the cursor into the text box, I get a message that says
                  > "text too large to be edited".
                  >
                  > Any clues?
                  >
                  >
                  > On Tue, 10 Aug 2004 20:59:55 -0700, Tom van Stiphout
                  > <no.spam.tom774 4@cox.net> wrote:
                  >[color=green]
                  > >On Tue, 10 Aug 2004 22:35:29 -0500, Lauren Wilson <???@???.com> wrote:
                  > >
                  > >Very large, but in my testing strangely unpredictable. I expected 2^32
                  > >- 1, but that was not the case.
                  > >
                  > >Here is the test code I ran:
                  > >Sub Test()
                  > >Dim s As String
                  > >Const EXPONENT As Integer = 28
                  > >s = String$(2 ^ EXPONENT - 1, 65)
                  > >Debug.Print EXPONENT, Len(s)
                  > >End Sub
                  > >
                  > >For values of EXPONENT greater than 28 I received an Out Of String
                  > >Space error. Still, at least 268 million characters - hopefully that's
                  > >enough?
                  > >
                  > >-Tom.
                  > >
                  > >[color=darkred]
                  > >>Access 2K
                  > >>
                  > >>dim MyStr as string
                  > >>
                  > >>What is the maximum amount of text or bytes that this variable can
                  > >>store? Does anyone know?[/color][/color]
                  >[/color]


                  Comment

                  • Lauren Wilson

                    #10
                    Re: Maximum bytes that can be stored in a string variable?


                    I suspected as much. You description below does provide a plausible
                    reason for this particular error. Thank you very much. I think it
                    sucks that a text box bound to a memo field cannot allow manual entry
                    of the full capacity of the memo field (allegedly 64 MB) but that's
                    the way it is so I will program accordingly.


                    On Thu, 12 Aug 2004 09:44:13 GMT, "'69 Camaro"
                    <Black_hole.To. 69Camaro@Spamea ter.org> wrote:
                    [color=blue]
                    >Hi, Lauren.
                    >
                    >You are trying to paste too much into the text box. Access 2K has two
                    >limits on Memo field size:
                    >
                    >1.) Maximum number of characters when data is entered through the user
                    >interface: 65,535.
                    >2.) Maximum number of characters when data is entered programmaticall y: 1
                    >GB.
                    >
                    >You can find these limits, as well as others, by entering the word
                    >specificatio ns in Access 2K help.
                    >
                    >Also, a known cause of Access database corruption is Memo fields being
                    >edited through bound text boxes. Using VBA code to input the 200K
                    >characters from the text box into the record will accommodate your needs
                    >and, hopefully, prevent database corruption.
                    >
                    >HTH.
                    >
                    >Gunny
                    >
                    >See http://www.QBuilt.com for all your database needs.
                    >See http://www.Access.QBuilt.com for Microsoft Access tips.
                    >
                    >
                    >"VRWC" <???@???.zip> wrote in message
                    >news:jfilh0dl1 fret389klgb8k5i 1mf5bckel4@4ax. com...[color=green]
                    >>
                    >> That should be plenty. I thought maybe running out of string space
                    >> was causing the error I'm getting from pasting about 200K characters
                    >> into a text box bound to a memo field. When I arrive on such records
                    >> and place the cursor into the text box, I get a message that says
                    >> "text too large to be edited".
                    >>
                    >> Any clues?
                    >>
                    >>
                    >> On Tue, 10 Aug 2004 20:59:55 -0700, Tom van Stiphout
                    >> <no.spam.tom774 4@cox.net> wrote:
                    >>[color=darkred]
                    >> >On Tue, 10 Aug 2004 22:35:29 -0500, Lauren Wilson <???@???.com> wrote:
                    >> >
                    >> >Very large, but in my testing strangely unpredictable. I expected 2^32
                    >> >- 1, but that was not the case.
                    >> >
                    >> >Here is the test code I ran:
                    >> >Sub Test()
                    >> >Dim s As String
                    >> >Const EXPONENT As Integer = 28
                    >> >s = String$(2 ^ EXPONENT - 1, 65)
                    >> >Debug.Print EXPONENT, Len(s)
                    >> >End Sub
                    >> >
                    >> >For values of EXPONENT greater than 28 I received an Out Of String
                    >> >Space error. Still, at least 268 million characters - hopefully that's
                    >> >enough?
                    >> >
                    >> >-Tom.
                    >> >
                    >> >
                    >> >>Access 2K
                    >> >>
                    >> >>dim MyStr as string
                    >> >>
                    >> >>What is the maximum amount of text or bytes that this variable can
                    >> >>store? Does anyone know?[/color]
                    >>[/color]
                    >[/color]

                    Comment

                    • '69 Camaro

                      #11
                      Re: Maximum bytes that can be stored in a string variable?

                      Hi, Lauren.

                      You're welcome. The bright side is that your hard work in coding a solution
                      to the 64 KB limit will probably help prevent future database corruptions
                      commonly caused by bound Memo fields.

                      Gunny

                      See http://www.QBuilt.com for all your database needs.
                      See http://www.Access.QBuilt.com for Microsoft Access tips.


                      "Lauren Wilson" <???@???.zip> wrote in message
                      news:4u9nh0lkf9 59m7jo6olncl1u3 ru06t2utm@4ax.c om...[color=blue]
                      >
                      > I suspected as much. You description below does provide a plausible
                      > reason for this particular error. Thank you very much. I think it
                      > sucks that a text box bound to a memo field cannot allow manual entry
                      > of the full capacity of the memo field (allegedly 64 MB) but that's
                      > the way it is so I will program accordingly.
                      >
                      >
                      > On Thu, 12 Aug 2004 09:44:13 GMT, "'69 Camaro"
                      > <Black_hole.To. 69Camaro@Spamea ter.org> wrote:
                      >[color=green]
                      > >Hi, Lauren.
                      > >
                      > >You are trying to paste too much into the text box. Access 2K has two
                      > >limits on Memo field size:
                      > >
                      > >1.) Maximum number of characters when data is entered through the user
                      > >interface: 65,535.
                      > >2.) Maximum number of characters when data is entered programmaticall y:[/color][/color]
                      1[color=blue][color=green]
                      > >GB.
                      > >
                      > >You can find these limits, as well as others, by entering the word
                      > >specificatio ns in Access 2K help.
                      > >
                      > >Also, a known cause of Access database corruption is Memo fields being
                      > >edited through bound text boxes. Using VBA code to input the 200K
                      > >characters from the text box into the record will accommodate your needs
                      > >and, hopefully, prevent database corruption.
                      > >
                      > >HTH.
                      > >
                      > >Gunny
                      > >
                      > >See http://www.QBuilt.com for all your database needs.
                      > >See http://www.Access.QBuilt.com for Microsoft Access tips.
                      > >
                      > >
                      > >"VRWC" <???@???.zip> wrote in message
                      > >news:jfilh0dl1 fret389klgb8k5i 1mf5bckel4@4ax. com...[color=darkred]
                      > >>
                      > >> That should be plenty. I thought maybe running out of string space
                      > >> was causing the error I'm getting from pasting about 200K characters
                      > >> into a text box bound to a memo field. When I arrive on such records
                      > >> and place the cursor into the text box, I get a message that says
                      > >> "text too large to be edited".
                      > >>
                      > >> Any clues?
                      > >>
                      > >>
                      > >> On Tue, 10 Aug 2004 20:59:55 -0700, Tom van Stiphout
                      > >> <no.spam.tom774 4@cox.net> wrote:
                      > >>
                      > >> >On Tue, 10 Aug 2004 22:35:29 -0500, Lauren Wilson <???@???.com> wrote:
                      > >> >
                      > >> >Very large, but in my testing strangely unpredictable. I expected 2^32
                      > >> >- 1, but that was not the case.
                      > >> >
                      > >> >Here is the test code I ran:
                      > >> >Sub Test()
                      > >> >Dim s As String
                      > >> >Const EXPONENT As Integer = 28
                      > >> >s = String$(2 ^ EXPONENT - 1, 65)
                      > >> >Debug.Print EXPONENT, Len(s)
                      > >> >End Sub
                      > >> >
                      > >> >For values of EXPONENT greater than 28 I received an Out Of String
                      > >> >Space error. Still, at least 268 million characters - hopefully that's
                      > >> >enough?
                      > >> >
                      > >> >-Tom.
                      > >> >
                      > >> >
                      > >> >>Access 2K
                      > >> >>
                      > >> >>dim MyStr as string
                      > >> >>
                      > >> >>What is the maximum amount of text or bytes that this variable can
                      > >> >>store? Does anyone know?
                      > >>[/color]
                      > >[/color]
                      >[/color]


                      Comment

                      • Lyle Fairfield

                        #12
                        Re: Maximum bytes that can be stored in a string variable?

                        Lauren Wilson <???@???.zip> wrote in news:4u9nh0lkf9 59m7jo6olncl1u3 ru06t2utm@
                        4ax.com:
                        [color=blue]
                        > I suspected as much. You description below does provide a plausible
                        > reason for this particular error. Thank you very much. I think it
                        > sucks that a text box bound to a memo field cannot allow manual entry
                        > of the full capacity of the memo field (allegedly 64 MB) but that's
                        > the way it is so I will program accordingly.[/color]

                        If I were programming such blobs of text I think I would create, save them as
                        file entities, possibly word documents, and use the ado - indexing service
                        duo to manage them. This is very powerful; using indexing services searching
                        capabilities and catalogs can produce remarkable results, instantly.


                        --
                        Lyle
                        --
                        use iso date format: yyyy-mm-dd

                        --
                        The e-mail address isn't, but you could use it to find one.

                        Comment

                        • Lauren Wilson

                          #13
                          Re: Maximum bytes that can be stored in a string variable?

                          Hi folks,

                          In light of the info below, does anyone know if the limits on editable
                          characters in a memo field bound to a text box has been improved in
                          Access 2003?



                          On Thu, 12 Aug 2004 09:44:13 GMT, "'69 Camaro"
                          <Black_hole.To. 69Camaro@Spamea ter.org> wrote:
                          [color=blue]
                          >Hi, Lauren.
                          >
                          >You are trying to paste too much into the text box. Access 2K has two
                          >limits on Memo field size:
                          >
                          >1.) Maximum number of characters when data is entered through the user
                          >interface: 65,535.
                          >2.) Maximum number of characters when data is entered programmaticall y: 1
                          >GB.
                          >
                          >You can find these limits, as well as others, by entering the word
                          >specificatio ns in Access 2K help.
                          >
                          >Also, a known cause of Access database corruption is Memo fields being
                          >edited through bound text boxes. Using VBA code to input the 200K
                          >characters from the text box into the record will accommodate your needs
                          >and, hopefully, prevent database corruption.
                          >
                          >HTH.
                          >
                          >Gunny
                          >
                          >See http://www.QBuilt.com for all your database needs.
                          >See http://www.Access.QBuilt.com for Microsoft Access tips.
                          >
                          >
                          >"VRWC" <???@???.zip> wrote in message
                          >news:jfilh0dl1 fret389klgb8k5i 1mf5bckel4@4ax. com...[color=green]
                          >>
                          >> That should be plenty. I thought maybe running out of string space
                          >> was causing the error I'm getting from pasting about 200K characters
                          >> into a text box bound to a memo field. When I arrive on such records
                          >> and place the cursor into the text box, I get a message that says
                          >> "text too large to be edited".
                          >>
                          >> Any clues?
                          >>
                          >>
                          >> On Tue, 10 Aug 2004 20:59:55 -0700, Tom van Stiphout
                          >> <no.spam.tom774 4@cox.net> wrote:
                          >>[color=darkred]
                          >> >On Tue, 10 Aug 2004 22:35:29 -0500, Lauren Wilson <???@???.com> wrote:
                          >> >
                          >> >Very large, but in my testing strangely unpredictable. I expected 2^32
                          >> >- 1, but that was not the case.
                          >> >
                          >> >Here is the test code I ran:
                          >> >Sub Test()
                          >> >Dim s As String
                          >> >Const EXPONENT As Integer = 28
                          >> >s = String$(2 ^ EXPONENT - 1, 65)
                          >> >Debug.Print EXPONENT, Len(s)
                          >> >End Sub
                          >> >
                          >> >For values of EXPONENT greater than 28 I received an Out Of String
                          >> >Space error. Still, at least 268 million characters - hopefully that's
                          >> >enough?
                          >> >
                          >> >-Tom.
                          >> >
                          >> >
                          >> >>Access 2K
                          >> >>
                          >> >>dim MyStr as string
                          >> >>
                          >> >>What is the maximum amount of text or bytes that this variable can
                          >> >>store? Does anyone know?[/color]
                          >>[/color]
                          >[/color]

                          Comment

                          • '69 Camaro

                            #14
                            Re: Maximum bytes that can be stored in a string variable?

                            Hi, Lauren.

                            The limits are due to constraints of the Jet architecture. Since Access
                            2003 also uses Jet 4.0, these constraints have not changed since the Access
                            2K version. The maximum limits for a memo field are still 65,535 characters
                            entered into a text box and 1 GB when the characters are entered into the
                            field programmaticall y.

                            And the prevalence of database corruption due to bound memo fields is just
                            as great in Access 2003 as it was in Access 2K. I strongly suggest that you
                            unbind the memo field on your bound form. You'll get two benefits: less
                            likelihood of corruption and the ability to paste up to 1 GB of text into
                            the text box on a form.

                            And if you take Lyle Fairfield's suggestion to first save the text as files,
                            then use ADO and indexing services to connect to them, you'll receive other
                            benefits as well, including a much smaller database.

                            HTH.

                            Gunny

                            See http://www.QBuilt.com for all your database needs.
                            See http://www.Access.QBuilt.com for Microsoft Access tips.

                            (Please remove ZERO_SPAM from my reply E-mail address, so that a message
                            will be forwarded to me.)


                            "Lauren Wilson" <???@???.???> wrote in message
                            news:shfmk0h15h fv49fouc31n7tlb 84spn27hc@4ax.c om...[color=blue]
                            > Hi folks,
                            >
                            > In light of the info below, does anyone know if the limits on editable
                            > characters in a memo field bound to a text box has been improved in
                            > Access 2003?
                            >
                            >
                            >
                            > On Thu, 12 Aug 2004 09:44:13 GMT, "'69 Camaro"
                            > <Black_hole.To. 69Camaro@Spamea ter.org> wrote:
                            >[color=green]
                            > >Hi, Lauren.
                            > >
                            > >You are trying to paste too much into the text box. Access 2K has two
                            > >limits on Memo field size:
                            > >
                            > >1.) Maximum number of characters when data is entered through the user
                            > >interface: 65,535.
                            > >2.) Maximum number of characters when data is entered programmaticall y:[/color][/color]
                            1[color=blue][color=green]
                            > >GB.
                            > >
                            > >You can find these limits, as well as others, by entering the word
                            > >specificatio ns in Access 2K help.
                            > >
                            > >Also, a known cause of Access database corruption is Memo fields being
                            > >edited through bound text boxes. Using VBA code to input the 200K
                            > >characters from the text box into the record will accommodate your needs
                            > >and, hopefully, prevent database corruption.
                            > >
                            > >HTH.
                            > >
                            > >Gunny
                            > >
                            > >See http://www.QBuilt.com for all your database needs.
                            > >See http://www.Access.QBuilt.com for Microsoft Access tips.
                            > >
                            > >
                            > >"VRWC" <???@???.zip> wrote in message
                            > >news:jfilh0dl1 fret389klgb8k5i 1mf5bckel4@4ax. com...[color=darkred]
                            > >>
                            > >> That should be plenty. I thought maybe running out of string space
                            > >> was causing the error I'm getting from pasting about 200K characters
                            > >> into a text box bound to a memo field. When I arrive on such records
                            > >> and place the cursor into the text box, I get a message that says
                            > >> "text too large to be edited".
                            > >>
                            > >> Any clues?
                            > >>
                            > >>
                            > >> On Tue, 10 Aug 2004 20:59:55 -0700, Tom van Stiphout
                            > >> <no.spam.tom774 4@cox.net> wrote:
                            > >>
                            > >> >On Tue, 10 Aug 2004 22:35:29 -0500, Lauren Wilson <???@???.com> wrote:
                            > >> >
                            > >> >Very large, but in my testing strangely unpredictable. I expected 2^32
                            > >> >- 1, but that was not the case.
                            > >> >
                            > >> >Here is the test code I ran:
                            > >> >Sub Test()
                            > >> >Dim s As String
                            > >> >Const EXPONENT As Integer = 28
                            > >> >s = String$(2 ^ EXPONENT - 1, 65)
                            > >> >Debug.Print EXPONENT, Len(s)
                            > >> >End Sub
                            > >> >
                            > >> >For values of EXPONENT greater than 28 I received an Out Of String
                            > >> >Space error. Still, at least 268 million characters - hopefully that's
                            > >> >enough?
                            > >> >
                            > >> >-Tom.
                            > >> >
                            > >> >
                            > >> >>Access 2K
                            > >> >>
                            > >> >>dim MyStr as string
                            > >> >>
                            > >> >>What is the maximum amount of text or bytes that this variable can
                            > >> >>store? Does anyone know?
                            > >>[/color]
                            > >[/color]
                            >[/color]


                            Comment

                            • Ron

                              #15
                              Re: Maximum bytes that can be stored in a string variable?

                              And where might "Lyle Fairfield's suggestion to first save the text as
                              files..." be found?

                              TIA
                              ron

                              "'69 Camaro" <ForwardZERO_SP AM.To.69Camaro@ Spameater.orgZE RO_SPAM> wrote in
                              message news:yDI2d.442$ je.99@trnddc04. ..[color=blue]
                              > Hi, Lauren.
                              >
                              > The limits are due to constraints of the Jet architecture. Since Access
                              > 2003 also uses Jet 4.0, these constraints have not changed since the[/color]
                              Access[color=blue]
                              > 2K version. The maximum limits for a memo field are still 65,535[/color]
                              characters[color=blue]
                              > entered into a text box and 1 GB when the characters are entered into the
                              > field programmaticall y.
                              >
                              > And the prevalence of database corruption due to bound memo fields is just
                              > as great in Access 2003 as it was in Access 2K. I strongly suggest that[/color]
                              you[color=blue]
                              > unbind the memo field on your bound form. You'll get two benefits: less
                              > likelihood of corruption and the ability to paste up to 1 GB of text into
                              > the text box on a form.
                              >
                              > And if you take Lyle Fairfield's suggestion to first save the text as[/color]
                              files,[color=blue]
                              > then use ADO and indexing services to connect to them, you'll receive[/color]
                              other[color=blue]
                              > benefits as well, including a much smaller database.
                              >
                              > HTH.
                              >
                              > Gunny
                              >
                              > See http://www.QBuilt.com for all your database needs.
                              > See http://www.Access.QBuilt.com for Microsoft Access tips.
                              >
                              > (Please remove ZERO_SPAM from my reply E-mail address, so that a message
                              > will be forwarded to me.)
                              >
                              >
                              > "Lauren Wilson" <???@???.???> wrote in message
                              > news:shfmk0h15h fv49fouc31n7tlb 84spn27hc@4ax.c om...[color=green]
                              > > Hi folks,
                              > >
                              > > In light of the info below, does anyone know if the limits on editable
                              > > characters in a memo field bound to a text box has been improved in
                              > > Access 2003?
                              > >
                              > >
                              > >
                              > > On Thu, 12 Aug 2004 09:44:13 GMT, "'69 Camaro"
                              > > <Black_hole.To. 69Camaro@Spamea ter.org> wrote:
                              > >[color=darkred]
                              > > >Hi, Lauren.
                              > > >
                              > > >You are trying to paste too much into the text box. Access 2K has two
                              > > >limits on Memo field size:
                              > > >
                              > > >1.) Maximum number of characters when data is entered through the user
                              > > >interface: 65,535.
                              > > >2.) Maximum number of characters when data is entered[/color][/color][/color]
                              programmaticall y:[color=blue]
                              > 1[color=green][color=darkred]
                              > > >GB.
                              > > >
                              > > >You can find these limits, as well as others, by entering the word
                              > > >specificatio ns in Access 2K help.
                              > > >
                              > > >Also, a known cause of Access database corruption is Memo fields being
                              > > >edited through bound text boxes. Using VBA code to input the 200K
                              > > >characters from the text box into the record will accommodate your[/color][/color][/color]
                              needs[color=blue][color=green][color=darkred]
                              > > >and, hopefully, prevent database corruption.
                              > > >
                              > > >HTH.
                              > > >
                              > > >Gunny
                              > > >
                              > > >See http://www.QBuilt.com for all your database needs.
                              > > >See http://www.Access.QBuilt.com for Microsoft Access tips.
                              > > >
                              > > >
                              > > >"VRWC" <???@???.zip> wrote in message
                              > > >news:jfilh0dl1 fret389klgb8k5i 1mf5bckel4@4ax. com...
                              > > >>
                              > > >> That should be plenty. I thought maybe running out of string space
                              > > >> was causing the error I'm getting from pasting about 200K characters
                              > > >> into a text box bound to a memo field. When I arrive on such records
                              > > >> and place the cursor into the text box, I get a message that says
                              > > >> "text too large to be edited".
                              > > >>
                              > > >> Any clues?
                              > > >>
                              > > >>
                              > > >> On Tue, 10 Aug 2004 20:59:55 -0700, Tom van Stiphout
                              > > >> <no.spam.tom774 4@cox.net> wrote:
                              > > >>
                              > > >> >On Tue, 10 Aug 2004 22:35:29 -0500, Lauren Wilson <???@???.com>[/color][/color][/color]
                              wrote:[color=blue][color=green][color=darkred]
                              > > >> >
                              > > >> >Very large, but in my testing strangely unpredictable. I expected[/color][/color][/color]
                              2^32[color=blue][color=green][color=darkred]
                              > > >> >- 1, but that was not the case.
                              > > >> >
                              > > >> >Here is the test code I ran:
                              > > >> >Sub Test()
                              > > >> >Dim s As String
                              > > >> >Const EXPONENT As Integer = 28
                              > > >> >s = String$(2 ^ EXPONENT - 1, 65)
                              > > >> >Debug.Print EXPONENT, Len(s)
                              > > >> >End Sub
                              > > >> >
                              > > >> >For values of EXPONENT greater than 28 I received an Out Of String
                              > > >> >Space error. Still, at least 268 million characters - hopefully[/color][/color][/color]
                              that's[color=blue][color=green][color=darkred]
                              > > >> >enough?
                              > > >> >
                              > > >> >-Tom.
                              > > >> >
                              > > >> >
                              > > >> >>Access 2K
                              > > >> >>
                              > > >> >>dim MyStr as string
                              > > >> >>
                              > > >> >>What is the maximum amount of text or bytes that this variable can
                              > > >> >>store? Does anyone know?
                              > > >>
                              > > >[/color]
                              > >[/color]
                              >
                              >[/color]


                              Comment

                              Working...