Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

TStringList - Size Limit - Appears to be one

0 views
Skip to first unread message

John Boren

unread,
Nov 19, 2003, 8:06:39 PM11/19/03
to

Now, looking through most of the posts, most mention that there is no size limit to a single item within a TStringList. Not sure what I'm doing wrong, but when I try to add a single string of 103K, while Delphi doesn't give an error, it just continues past the TStringlist.Add statement without adding it to the Stringlist.

In the same routine, other smaller strings work fine. I also checked for a null value in the string which there weren't any.

Environment: D6, Update Pack 2 - Win 2000/sp4, 525MB memory

begin
TableQ.Add(InMsg);
end;

Any ideas? Thanks in advance.

Mike Williams (TeamB)

unread,
Nov 19, 2003, 8:28:39 PM11/19/03
to

I'm not aware of any such limit. If there were a limit I'd guess it would
be a nice even number like 64K, not 103K. I'd suggest setting up a test
app that tries to add the string in a loop. If it fails delete the last
character from the string and try to add it again. Once it succeeds you've
either found a limit (which would surprise me) or some bad data in the
string that is causing it to fail.

--
-Mike

Reiner

unread,
Nov 19, 2003, 10:04:48 PM11/19/03
to
How do you know its isn't added (what do you do to check)? Did you also
check for embedded CRLF chars?

There is a problem with string lists when displayed in some controls (eg
TMemo) but only in Win 95/98/Me.

"John Boren" <jbo...@idsinc-usa.com> wrote in message
news:3fbc21af$1...@newsgroups.borland.com...

John Boren

unread,
Nov 20, 2003, 12:14:10 AM11/20/03
to
Reiner:

Found the problem...unrelated. It was actually adding it to the
TStringList after I further evaluated it...

Sorry for the post.

Reiner wrote:

>How do you know its isn't added (what do you do to check)? Did you also
>check for embedded CRLF chars?
>
>

When running through the code, I evaluate the TStringList after the
Add...its empty. There are no CRLF's in it.

>There is a problem with string lists when displayed in some controls (eg
>TMemo) but only in Win 95/98/Me.
>

Yes, but this is just a normal TStringList handled in memory, not
associated with a memo object or any other VCL Object.

0 new messages