Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

How Much Can A String Contain?

9 posts in Objects Last posting was on 2007-05-15 16:01:17.0Z
Lloyd Dzino Posted on 2007-05-09 18:36:41.0Z
Sender: f5a.46421330.1804289383@sybase.com
From: Lloyd Dzino
Newsgroups: sybase.public.powerbuilder.objects
Subject: How Much Can A String Contain?
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <464214b9.f8d.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 9 May 2007 11:36:41 -0700
X-Trace: forums-1-dub 1178735801 10.22.241.41 (9 May 2007 11:36:41 -0700)
X-Original-Trace: 9 May 2007 11:36:41 -0700, 10.22.241.41
Lines: 10
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9345
Article PK: 736503

I have a RichTextEdit control, rte_name in a window. I have
a column, case_note of datatype TEXT with data I'm copying
into rte_name. In the save event, I have the following
statement:
string ls_text

ls_text = rte_name.CopyRTF()
My question is the the case_note column can take up to 2
Gigs of data. Now with the above statement, is there a risk
of the string truncating the data in the RichTextEdit?


Jason 'Bug' Fenter [TeamSybase] Posted on 2007-05-10 20:45:00.0Z
From: "Jason 'Bug' Fenter [TeamSybase]" <fenterbug@gmail.com>
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: How Much Can A String Contain?
Date: 10 May 2007 13:45:00 -0700
Organization: http://groups.google.com
Lines: 21
Message-ID: <1178829900.388605.258510@e65g2000hsc.googlegroups.com>
References: <464214b9.f8d.1681692777@sybase.com>
NNTP-Posting-Host: 65.201.123.212
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
X-Trace: posting.google.com 1178829900 12642 127.0.0.1 (10 May 2007 20:45:00 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Thu, 10 May 2007 20:45:00 +0000 (UTC)
In-Reply-To: <464214b9.f8d.1681692777@sybase.com>
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1,gzip(gfe),gzip(gfe)
Complaints-To: groups-abuse@google.com
Injection-Info: e65g2000hsc.googlegroups.com; posting-host=65.201.123.212; posting-account=vVR4zA0AAABcZVJgvtr18BEgLvY3d_Ls
Path: forums-1-dub!forums-master!newswest.sybase.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!e65g2000hsc.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9346
Article PK: 736505


On May 9, 1:36 pm, Lloyd Dzino wrote:
> I have a RichTextEdit control, rte_name in a window. I have
> a column, case_note of datatype TEXT with data I'm copying
> into rte_name. In the save event, I have the following
> statement:
> string ls_text
>
> ls_text = rte_name.CopyRTF()
> My question is the the case_note column can take up to 2
> Gigs of data. Now with the above statement, is there a risk
> of the string truncating the data in the RichTextEdit?

There's nothing in the help files about a size limit on the CopyRTF()
function. However, the data is stored in a string variable, and the
help files state about string variables: "Any ASCII character with
variable length (0 to 2147483647)." While it would be an extreme case,
it appears that truncation *is* possible. Another thing to consider,
though, is that this string variable exists in memory and you will
probably have more issues with memory consumption than you will with
data truncation.


Philip Salgannik Posted on 2007-05-11 13:19:36.0Z
From: "Philip Salgannik" <philemaxNOSPAM@comcast.net>
Newsgroups: sybase.public.powerbuilder.objects
References: <1178829900.388605.258510@e65g2000hsc.googlegroups.com> <46446c4f.595e.1681692777@sybase.com>
Subject: Re: How Much Can A String Contain?
Lines: 31
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3028
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: c-24-34-73-19.hsd1.ma.comcast.net
X-Original-NNTP-Posting-Host: c-24-34-73-19.hsd1.ma.comcast.net
Message-ID: <46446d68$1@forums-1-dub>
Date: 11 May 2007 06:19:36 -0700
X-Trace: forums-1-dub 1178889576 24.34.73.19 (11 May 2007 06:19:36 -0700)
X-Original-Trace: 11 May 2007 06:19:36 -0700, c-24-34-73-19.hsd1.ma.comcast.net
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9348
Article PK: 736506

Errr, not bring 2 gigs to the client?

<Lloyd Bobby> wrote in message news:46446c4f.595e.1681692777@sybase.com...
>> On May 9, 1:36 pm, Lloyd Dzino wrote:
>> > I have a RichTextEdit control, rte_name in a window. I
>> > have a column, case_note of datatype TEXT with data I'm
>> > copying into rte_name. In the save event, I have the
>> > following statement:
>> > string ls_text
>> >
>> > ls_text = rte_name.CopyRTF()
>> > My question is the the case_note column can take up to 2
>> > Gigs of data. Now with the above statement, is there a
>> > risk of the string truncating the data in the
>> RichTextEdit?
>>
>> There's nothing in the help files about a size limit on
>> the CopyRTF() function. However, the data is stored in a
>> string variable, and the help files state about string
>> variables: "Any ASCII character with variable length (0 to
>> 2147483647)." While it would be an extreme case, it
>> appears that truncation *is* possible. Another thing to
>> consider, though, is that this string variable exists in
>> memory and you will probably have more issues with memory
>> consumption than you will with data truncation.
>>
>
> As a matter of fact, I'm getting an "Out Of Memory" error as
> a result of that. On top of that the text is being
> truncated. What then should I do to avoid both error?


Lloyd Bobby Posted on 2007-05-11 14:53:58.0Z
Sender: f5a.46421330.1804289383@sybase.com
From: Lloyd Bobby
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: How Much Can A String Contain?
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <46448386.5c0d.1681692777@sybase.com>
References: <46446d68$1@forums-1-dub>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 11 May 2007 07:53:58 -0700
X-Trace: forums-1-dub 1178895238 10.22.241.41 (11 May 2007 07:53:58 -0700)
X-Original-Trace: 11 May 2007 07:53:58 -0700, 10.22.241.41
Lines: 46
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9349
Article PK: 736508

The text is definitely not 2 Gigs. I put the following code
in the event

integer li_NoteLength
li_NoteLength = rte_name.SelectTextAll()and it returned
13925.

I proceeded to put the following code:
ls_text = rte_name.CopyRTF()
dw_1.SetItem(row, "case_notes", ls_text )

However it seems ls_text gets truncated if the character
length exceeds 13725.

> Errr, not bring 2 gigs to the client?
> <Lloyd Bobby> wrote in message
> news:46446c4f.595e.1681692777@sybase.com... >> On May 9,
> 1:36 pm, Lloyd Dzino wrote: >> > I have a RichTextEdit
> control, rte_name in a window. I >> > have a column,
> case_note of datatype TEXT with data I'm >> > copying into
> rte_name. In the save event, I have the >> > following
> statement: >> > string ls_text
> >> >
> >> > ls_text = rte_name.CopyRTF()
> >> > My question is the the case_note column can take up
> to 2 >> > Gigs of data. Now with the above statement, is
> there a >> > risk of the string truncating the data in the
> >> RichTextEdit?
> >>
> >> There's nothing in the help files about a size limit on
> >> the CopyRTF() function. However, the data is stored in
> a >> string variable, and the help files state about
> string >> variables: "Any ASCII character with variable
> length (0 to >> 2147483647)." While it would be an extreme
> case, it >> appears that truncation *is* possible. Another
> thing to >> consider, though, is that this string variable
> exists in >> memory and you will probably have more issues
> with memory >> consumption than you will with data
> truncation. >>
> >
> > As a matter of fact, I'm getting an "Out Of Memory"
> > error as a result of that. On top of that the text is
> > being truncated. What then should I do to avoid both
> error?
>
>


Philip Salgannik Posted on 2007-05-11 15:02:51.0Z
Reply-To: "Philip Salgannik" <PhilipSalgannik@work.com>
From: "Philip Salgannik" <PhilipSalgannik@work.com>
Newsgroups: sybase.public.powerbuilder.objects
References: <46446d68$1@forums-1-dub> <46448386.5c0d.1681692777@sybase.com>
Subject: Re: How Much Can A String Contain?
Lines: 51
Organization: ATWORK
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3028
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: host41.155.212.59.conversent.net
X-Original-NNTP-Posting-Host: host41.155.212.59.conversent.net
Message-ID: <4644859b$1@forums-1-dub>
Date: 11 May 2007 08:02:51 -0700
X-Trace: forums-1-dub 1178895771 155.212.59.41 (11 May 2007 08:02:51 -0700)
X-Original-Trace: 11 May 2007 08:02:51 -0700, host41.155.212.59.conversent.net
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9350
Article PK: 736509

So what is the purpose of dw_1.SetItem(row, "case_notes", ls_text ) again?

<Lloyd Bobby> wrote in message news:46448386.5c0d.1681692777@sybase.com...
> The text is definitely not 2 Gigs. I put the following code
> in the event
>
> integer li_NoteLength
> li_NoteLength = rte_name.SelectTextAll()and it returned
> 13925.
>
> I proceeded to put the following code:
> ls_text = rte_name.CopyRTF()
> dw_1.SetItem(row, "case_notes", ls_text )
>
> However it seems ls_text gets truncated if the character
> length exceeds 13725.
>
>> Errr, not bring 2 gigs to the client?
>> <Lloyd Bobby> wrote in message
>> news:46446c4f.595e.1681692777@sybase.com... >> On May 9,
>> 1:36 pm, Lloyd Dzino wrote: >> > I have a RichTextEdit
>> control, rte_name in a window. I >> > have a column,
>> case_note of datatype TEXT with data I'm >> > copying into
>> rte_name. In the save event, I have the >> > following
>> statement: >> > string ls_text
>> >> >
>> >> > ls_text = rte_name.CopyRTF()
>> >> > My question is the the case_note column can take up
>> to 2 >> > Gigs of data. Now with the above statement, is
>> there a >> > risk of the string truncating the data in the
>> >> RichTextEdit?
>> >>
>> >> There's nothing in the help files about a size limit on
>> >> the CopyRTF() function. However, the data is stored in
>> a >> string variable, and the help files state about
>> string >> variables: "Any ASCII character with variable
>> length (0 to >> 2147483647)." While it would be an extreme
>> case, it >> appears that truncation *is* possible. Another
>> thing to >> consider, though, is that this string variable
>> exists in >> memory and you will probably have more issues
>> with memory >> consumption than you will with data
>> truncation. >>
>> >
>> > As a matter of fact, I'm getting an "Out Of Memory"
>> > error as a result of that. On top of that the text is
>> > being truncated. What then should I do to avoid both
>> error?
>>
>>


Lloyd Bobby Posted on 2007-05-14 19:16:40.0Z
Sender: f5a.46421330.1804289383@sybase.com
From: Lloyd Bobby
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: How Much Can A String Contain?
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4648b597.6da3.1681692777@sybase.com>
References: <4644859b$1@forums-1-dub>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 14 May 2007 12:16:40 -0700
X-Trace: forums-1-dub 1179170200 10.22.241.41 (14 May 2007 12:16:40 -0700)
X-Original-Trace: 14 May 2007 12:16:40 -0700, 10.22.241.41
Lines: 59
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9353
Article PK: 736512

The dw1.SetItem(row,"case_notes",ls_text) copies what is in
the RichTextEdit to a the actual table column, case_notes.
This ensures that when you run dw_1.Update(), the text is
updated.
Where I need help is how I can avoid the truncation, and
avoid the the "Out Of Memory" error

> So what is the purpose of dw_1.SetItem(row, "case_notes",
> ls_text ) again?
>
> <Lloyd Bobby> wrote in message
> > news:46448386.5c0d.1681692777@sybase.com... The text is
> > definitely not 2 Gigs. I put the following code in the
> event >
> > integer li_NoteLength
> > li_NoteLength = rte_name.SelectTextAll()and it returned
> > 13925.
> >
> > I proceeded to put the following code:
> > ls_text = rte_name.CopyRTF()
> > dw_1.SetItem(row, "case_notes", ls_text )
> >
> > However it seems ls_text gets truncated if the character
> > length exceeds 13725.
> >
> >> Errr, not bring 2 gigs to the client?
> >> <Lloyd Bobby> wrote in message
> >> news:46446c4f.595e.1681692777@sybase.com... >> On May 9
> , >> 1:36 pm, Lloyd Dzino wrote: >> > I have a
> RichTextEdit >> control, rte_name in a window. I >> > have
> a column, >> case_note of datatype TEXT with data I'm >> >
> copying into >> rte_name. In the save event, I have the >>
> > following >> statement: >> > string ls_text
> >> >> >
> >> >> > ls_text = rte_name.CopyRTF()
> >> >> > My question is the the case_note column can take
> up >> to 2 >> > Gigs of data. Now with the above statement
> , is >> there a >> > risk of the string truncating the
> data in the >> >> RichTextEdit?
> >> >>
> >> >> There's nothing in the help files about a size limit
> on >> >> the CopyRTF() function. However, the data is
> stored in >> a >> string variable, and the help files
> state about >> string >> variables: "Any ASCII character
> with variable >> length (0 to >> 2147483647)." While it
> would be an extreme >> case, it >> appears that truncation
> *is* possible. Another >> thing to >> consider, though, is
> that this string variable >> exists in >> memory and you
> will probably have more issues >> with memory >>
> consumption than you will with data >> truncation. >>
> >> >
> >> > As a matter of fact, I'm getting an "Out Of Memory"
> >> > error as a result of that. On top of that the text is
> >> > being truncated. What then should I do to avoid both
> >> error?
> >>
> >>
>
>


Philip Salgannik Posted on 2007-05-14 21:17:34.0Z
Reply-To: "Philip Salgannik" <PhilipSalgannik@work.com>
From: "Philip Salgannik" <PhilipSalgannik@work.com>
Newsgroups: sybase.public.powerbuilder.objects
References: <4644859b$1@forums-1-dub> <4648b597.6da3.1681692777@sybase.com>
Subject: Re: How Much Can A String Contain?
Lines: 67
Organization: ATWORK
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3028
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: host41.155.212.59.conversent.net
X-Original-NNTP-Posting-Host: host41.155.212.59.conversent.net
Message-ID: <4648d1ee$1@forums-1-dub>
Date: 14 May 2007 14:17:34 -0700
X-Trace: forums-1-dub 1179177454 155.212.59.41 (14 May 2007 14:17:34 -0700)
X-Original-Trace: 14 May 2007 14:17:34 -0700, host41.155.212.59.conversent.net
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9354
Article PK: 736513

One way or another I suspected this much. I think you are doing it wrong,
i.e updating the database thru the datawindow hoping that RTF in gig sizes
will end up in it...
What DBMS are you using?

<Lloyd Bobby> wrote in message news:4648b597.6da3.1681692777@sybase.com...
> The dw1.SetItem(row,"case_notes",ls_text) copies what is in
> the RichTextEdit to a the actual table column, case_notes.
> This ensures that when you run dw_1.Update(), the text is
> updated.
> Where I need help is how I can avoid the truncation, and
> avoid the the "Out Of Memory" error
>
>> So what is the purpose of dw_1.SetItem(row, "case_notes",
>> ls_text ) again?
>>
>> <Lloyd Bobby> wrote in message
>> > news:46448386.5c0d.1681692777@sybase.com... The text is
>> > definitely not 2 Gigs. I put the following code in the
>> event >
>> > integer li_NoteLength
>> > li_NoteLength = rte_name.SelectTextAll()and it returned
>> > 13925.
>> >
>> > I proceeded to put the following code:
>> > ls_text = rte_name.CopyRTF()
>> > dw_1.SetItem(row, "case_notes", ls_text )
>> >
>> > However it seems ls_text gets truncated if the character
>> > length exceeds 13725.
>> >
>> >> Errr, not bring 2 gigs to the client?
>> >> <Lloyd Bobby> wrote in message
>> >> news:46446c4f.595e.1681692777@sybase.com... >> On May 9
>> , >> 1:36 pm, Lloyd Dzino wrote: >> > I have a
>> RichTextEdit >> control, rte_name in a window. I >> > have
>> a column, >> case_note of datatype TEXT with data I'm >> >
>> copying into >> rte_name. In the save event, I have the >>
>> > following >> statement: >> > string ls_text
>> >> >> >
>> >> >> > ls_text = rte_name.CopyRTF()
>> >> >> > My question is the the case_note column can take
>> up >> to 2 >> > Gigs of data. Now with the above statement
>> , is >> there a >> > risk of the string truncating the
>> data in the >> >> RichTextEdit?
>> >> >>
>> >> >> There's nothing in the help files about a size limit
>> on >> >> the CopyRTF() function. However, the data is
>> stored in >> a >> string variable, and the help files
>> state about >> string >> variables: "Any ASCII character
>> with variable >> length (0 to >> 2147483647)." While it
>> would be an extreme >> case, it >> appears that truncation
>> *is* possible. Another >> thing to >> consider, though, is
>> that this string variable >> exists in >> memory and you
>> will probably have more issues >> with memory >>
>> consumption than you will with data >> truncation. >>
>> >> >
>> >> > As a matter of fact, I'm getting an "Out Of Memory"
>> >> > error as a result of that. On top of that the text is
>> >> > being truncated. What then should I do to avoid both
>> >> error?
>> >>
>> >>
>>
>>


Lloyd Bobby Posted on 2007-05-15 16:01:17.0Z
Sender: f5a.46421330.1804289383@sybase.com
From: Lloyd Bobby
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: How Much Can A String Contain?
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4649d94d.f57.1681692777@sybase.com>
References: <4648d1ee$1@forums-1-dub>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 15 May 2007 09:01:17 -0700
X-Trace: forums-1-dub 1179244877 10.22.241.41 (15 May 2007 09:01:17 -0700)
X-Original-Trace: 15 May 2007 09:01:17 -0700, 10.22.241.41
Lines: 70
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9356
Article PK: 736515

I use Sybase 12.5 DBMS.

> One way or another I suspected this much. I think you are
> doing it wrong, i.e updating the database thru the
> datawindow hoping that RTF in gig sizes will end up in
> it... What DBMS are you using?
>
> <Lloyd Bobby> wrote in message
> > news:4648b597.6da3.1681692777@sybase.com... The
> > dw1.SetItem(row,"case_notes",ls_text) copies what is in
> > the RichTextEdit to a the actual table column,
> case_notes. This ensures that when you run dw_1.Update(),
> > the text is updated.
> > Where I need help is how I can avoid the truncation, and
> > avoid the the "Out Of Memory" error
> >
> >> So what is the purpose of dw_1.SetItem(row,
> "case_notes", >> ls_text ) again?
> >>
> >> <Lloyd Bobby> wrote in message
> >> > news:46448386.5c0d.1681692777@sybase.com... The text
> is >> > definitely not 2 Gigs. I put the following code in
> the >> event >
> >> > integer li_NoteLength
> >> > li_NoteLength = rte_name.SelectTextAll()and it
> returned >> > 13925.
> >> >
> >> > I proceeded to put the following code:
> >> > ls_text = rte_name.CopyRTF()
> >> > dw_1.SetItem(row, "case_notes", ls_text )
> >> >
> >> > However it seems ls_text gets truncated if the
> character >> > length exceeds 13725.
> >> >
> >> >> Errr, not bring 2 gigs to the client?
> >> >> <Lloyd Bobby> wrote in message
> >> >> news:46446c4f.595e.1681692777@sybase.com... >> On
> May 9 >> , >> 1:36 pm, Lloyd Dzino wrote: >> > I have a
> >> RichTextEdit >> control, rte_name in a window. I >> >
> have >> a column, >> case_note of datatype TEXT with data
> I'm >> > >> copying into >> rte_name. In the save event, I
> have the >> >> > following >> statement: >> > string
> ls_text >> >> >> >
> >> >> >> > ls_text = rte_name.CopyRTF()
> >> >> >> > My question is the the case_note column can
> take >> up >> to 2 >> > Gigs of data. Now with the above
> statement >> , is >> there a >> > risk of the string
> truncating the >> data in the >> >> RichTextEdit?
> >> >> >>
> >> >> >> There's nothing in the help files about a size
> limit >> on >> >> the CopyRTF() function. However, the
> data is >> stored in >> a >> string variable, and the help
> files >> state about >> string >> variables: "Any ASCII
> character >> with variable >> length (0 to >>
> 2147483647)." While it >> would be an extreme >> case, it
> >> appears that truncation >> *is* possible. Another >>
> thing to >> consider, though, is >> that this string
> variable >> exists in >> memory and you >> will probably
> have more issues >> with memory >> >> consumption than you
> will with data >> truncation. >> >> >> >
> >> >> > As a matter of fact, I'm getting an "Out Of
> Memory" >> >> > error as a result of that. On top of that
> the text is >> >> > being truncated. What then should I do
> to avoid both >> >> error?
> >> >>
> >> >>
> >>
> >>
>
>