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.

PasteRTF limitations and RTE control

7 posts in Last posting was on 2009-09-11 00:50:46.0Z
Don Posted on 2009-09-08 03:56:51.0Z
From: "Don" <dmcquade@dmapros.com>
Newsgroups: sybase.public.powerbuilder.rte
Subject: PasteRTF limitations and RTE control
Lines: 23
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4aa5d603$1@forums-1-dub>
Date: 7 Sep 2009 20:56:51 -0700
X-Trace: forums-1-dub 1252382211 10.22.241.152 (7 Sep 2009 20:56:51 -0700)
X-Original-Trace: 7 Sep 2009 20:56:51 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.rte:302
Article PK: 761976

I have a RTE control on a tabpage in a PB 10.5 app. I retrieve data from a
varbinary column in a MS SQL 2005 DB into a blob variable which is then
pasted into the RTE control using the PasteRTF command. This seems to work
for data that is of a limited size (roughtly 4 pages or less). Anything
larger does not display. I tested the result of the PasteRTF command which
appears to be the size of the varbinary column data. Here is the code I am
using to get the data into the control:

Long ll_rtn
Blob lblb_report

lblb_report = a function that retrieves the data from the DB.

rte_control.SelectTextAll()
ll_rtn = rte_Control.PasteRTF(String(lblb_report), Detail!)

Any help on why a large RTF doc does not display when pasted into the
control would be greatly appreciated. If anyone has any suggestions on how
to allow manipulation of RTF data is also welcomed.

Don


Chris Pollach Posted on 2009-09-08 17:35:00.0Z
From: "Chris Pollach" <cpollach@travel-net.com>
Newsgroups: sybase.public.powerbuilder.rte
References: <4aa5d603$1@forums-1-dub>
Subject: Re: PasteRTF limitations and RTE control
Lines: 42
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4aa695c4@forums-1-dub>
Date: 8 Sep 2009 10:35:00 -0700
X-Trace: forums-1-dub 1252431300 10.22.241.152 (8 Sep 2009 10:35:00 -0700)
X-Original-Trace: 8 Sep 2009 10:35:00 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.rte:303
Article PK: 791876

Hi Don;

Are you sure that the document is not being cut-off in the Blob? By that
I mean in your SS connection DBParm field - do you have the
"PBMaxBlobSize=nnnn" setting set to a reasonable value. Now this will also
depend on the DB Driver you are using as well.

Can you tell use the driver and PB version you are using?

--
Regards ... Chris
ISUG - NA RUG Director
http://chrispollach.pbdjmagazine.com

"Don" <dmcquade@dmapros.com> wrote in message
news:4aa5d603$1@forums-1-dub...
>I have a RTE control on a tabpage in a PB 10.5 app. I retrieve data from a
> varbinary column in a MS SQL 2005 DB into a blob variable which is then
> pasted into the RTE control using the PasteRTF command. This seems to work
> for data that is of a limited size (roughtly 4 pages or less). Anything
> larger does not display. I tested the result of the PasteRTF command which
> appears to be the size of the varbinary column data. Here is the code I am
> using to get the data into the control:
>
> Long ll_rtn
> Blob lblb_report
>
> lblb_report = a function that retrieves the data from the DB.
>
> rte_control.SelectTextAll()
> ll_rtn = rte_Control.PasteRTF(String(lblb_report), Detail!)
>
> Any help on why a large RTF doc does not display when pasted into the
> control would be greatly appreciated. If anyone has any suggestions on how
> to allow manipulation of RTF data is also welcomed.
>
> Don
>
>


Don Posted on 2009-09-08 22:40:21.0Z
From: "Don" <dmcquade@dmapros.com>
Newsgroups: sybase.public.powerbuilder.rte
References: <4aa5d603$1@forums-1-dub> <4aa695c4@forums-1-dub>
Subject: Re: PasteRTF limitations and RTE control
Lines: 65
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4aa6dd55@forums-1-dub>
Date: 8 Sep 2009 15:40:21 -0700
X-Trace: forums-1-dub 1252449621 10.22.241.152 (8 Sep 2009 15:40:21 -0700)
X-Original-Trace: 8 Sep 2009 15:40:21 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.rte:305
Article PK: 761977

The app is PB 10.5.2 and the DB driver is SQL Server ODBC v 2000.85.1117.00.

I did a test by adding the LEN command on the blob and can see that it
appears to be the correct size. I also calculate the return value of the
PasteRTF command which returns the same length. If the blob is of a certain
size or larger, it appears as if it is not pasting into the RTE control. The
control is empty after running the PasteRTF command even though the return
value is 16385.

Thanks
Don

"Chris Pollach" <cpollach@travel-net.com> wrote in message
news:4aa695c4@forums-1-dub...
> Hi Don;
>
> Are you sure that the document is not being cut-off in the Blob? By
that
> I mean in your SS connection DBParm field - do you have the
> "PBMaxBlobSize=nnnn" setting set to a reasonable value. Now this will also
> depend on the DB Driver you are using as well.
>
> Can you tell use the driver and PB version you are using?
>
> --
> Regards ... Chris
> ISUG - NA RUG Director
> http://chrispollach.pbdjmagazine.com
>
>
> "Don" <dmcquade@dmapros.com> wrote in message
> news:4aa5d603$1@forums-1-dub...
> >I have a RTE control on a tabpage in a PB 10.5 app. I retrieve data from
a
> > varbinary column in a MS SQL 2005 DB into a blob variable which is then
> > pasted into the RTE control using the PasteRTF command. This seems to
work
> > for data that is of a limited size (roughtly 4 pages or less). Anything
> > larger does not display. I tested the result of the PasteRTF command
which
> > appears to be the size of the varbinary column data. Here is the code I
am
> > using to get the data into the control:
> >
> > Long ll_rtn
> > Blob lblb_report
> >
> > lblb_report = a function that retrieves the data from the DB.
> >
> > rte_control.SelectTextAll()
> > ll_rtn = rte_Control.PasteRTF(String(lblb_report), Detail!)
> >
> > Any help on why a large RTF doc does not display when pasted into the
> > control would be greatly appreciated. If anyone has any suggestions on
how
> > to allow manipulation of RTF data is also welcomed.
> >
> > Don
> >
> >
>
>


Bruce Armstrong Posted on 2009-09-09 04:27:08.0Z
From: Bruce Armstrong <NOCANSPAM_bruce.armstrong@yahoo.com>
Newsgroups: sybase.public.powerbuilder.rte
Subject: Re: PasteRTF limitations and RTE control
Reply-To: NOCANSPAM_bruce.armstrong@yahoo.com
Message-ID: <dgaea5loql36po72301oehb52b2ac1jc2c@4ax.com>
References: <4aa5d603$1@forums-1-dub> <4aa695c4@forums-1-dub> <4aa6dd55@forums-1-dub>
X-Newsreader: Forte Agent 5.00/32.1171
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Date: 8 Sep 2009 21:27:08 -0700
X-Trace: forums-1-dub 1252470428 10.22.241.152 (8 Sep 2009 21:27:08 -0700)
X-Original-Trace: 8 Sep 2009 21:27:08 -0700, vip152.sybase.com
Lines: 87
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.rte:306
Article PK: 791875

I routinely paste much more RTF data than that, but I also don't
specify the band that I'm inserting into.

Given that the limit that you're running into is almost exactly half
the size of the limit of an int (32767), I'm thinking you may have an
variable somewhere that is limiting the size of the data to 32K or so.

I'd suggest taking a second look at "a function that retrieves the
data from the DB."

On 8 Sep 2009 15:40:21 -0700, "Don" <dmcquade@dmapros.com> wrote:

>The app is PB 10.5.2 and the DB driver is SQL Server ODBC v 2000.85.1117.00.
>
>I did a test by adding the LEN command on the blob and can see that it
>appears to be the correct size. I also calculate the return value of the
>PasteRTF command which returns the same length. If the blob is of a certain
>size or larger, it appears as if it is not pasting into the RTE control. The
>control is empty after running the PasteRTF command even though the return
>value is 16385.
>
>Thanks
>Don
>
>
>"Chris Pollach" <cpollach@travel-net.com> wrote in message
>news:4aa695c4@forums-1-dub...
>> Hi Don;
>>
>> Are you sure that the document is not being cut-off in the Blob? By
>that
>> I mean in your SS connection DBParm field - do you have the
>> "PBMaxBlobSize=nnnn" setting set to a reasonable value. Now this will also
>> depend on the DB Driver you are using as well.
>>
>> Can you tell use the driver and PB version you are using?
>>
>> --
>> Regards ... Chris
>> ISUG - NA RUG Director
>> http://chrispollach.pbdjmagazine.com
>>
>>
>> "Don" <dmcquade@dmapros.com> wrote in message
>> news:4aa5d603$1@forums-1-dub...
>> >I have a RTE control on a tabpage in a PB 10.5 app. I retrieve data from
>a
>> > varbinary column in a MS SQL 2005 DB into a blob variable which is then
>> > pasted into the RTE control using the PasteRTF command. This seems to
>work
>> > for data that is of a limited size (roughtly 4 pages or less). Anything
>> > larger does not display. I tested the result of the PasteRTF command
>which
>> > appears to be the size of the varbinary column data. Here is the code I
>am
>> > using to get the data into the control:
>> >
>> > Long ll_rtn
>> > Blob lblb_report
>> >
>> > lblb_report = a function that retrieves the data from the DB.
>> >
>> > rte_control.SelectTextAll()
>> > ll_rtn = rte_Control.PasteRTF(String(lblb_report), Detail!)
>> >
>> > Any help on why a large RTF doc does not display when pasted into the
>> > control would be greatly appreciated. If anyone has any suggestions on
>how
>> > to allow manipulation of RTF data is also welcomed.
>> >
>> > Don
>> >
>> >
>>
>>
>

-----------------------------------

My Web 2.0 Stuff

Blog: http://bruce.pbdjmagazine.com/
Facebook: http://www.facebook.com/people/Bruce-Armstrong/1600223798
Fotki: http://public.fotki.com/brucearmstrong/
LinkedIn: http://www.linkedin.com/in/bruceaarmstrong
Twitter: http://twitter.com/bruce_armstrong
YouTube: http://www.youtube.com/user/brucearmstrong


Don Posted on 2009-09-10 01:47:38.0Z
From: "Don" <dmcquade@dmapros.com>
Newsgroups: sybase.public.powerbuilder.rte
References: <4aa5d603$1@forums-1-dub> <4aa695c4@forums-1-dub> <4aa6dd55@forums-1-dub> <dgaea5loql36po72301oehb52b2ac1jc2c@4ax.com>
Subject: Re: PasteRTF limitations and RTE control
Lines: 132
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4aa85aba$1@forums-1-dub>
Date: 9 Sep 2009 18:47:38 -0700
X-Trace: forums-1-dub 1252547258 10.22.241.152 (9 Sep 2009 18:47:38 -0700)
X-Original-Trace: 9 Sep 2009 18:47:38 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.rte:307
Article PK: 791878

You are correct. I added a line in the function to calculate the length of
the blob returned and it is exactly 32787. The return value of the PasteRTF
command seems to always be half that length. I don't limit the size of the
blob variable and do not have a DB connection parameter that looks like it
limits the size. Here is the code for the function:

Blob lblb_rtfreport

Transaction trans_blob
trans_blob = CREATE transaction
String ls_database = "Connectstring='DSN=MyDB;'"
trans_blob.DBMS = "ODBC"
trans_blob.DBParm = ls_database
trans_blob.AutoCommit = True
CONNECT USING trans_blob ;

SELECTBLOB reports_file
INTO :lblb_rtfreport
FROM tbl_reports
WHERE reports_id = :arg_reportid
USING trans_blob ;

DISCONNECT USING trans_blob ;

/* Test the length of the blob variable retrieved */
messagebox('test', String(Len(lblb_rtfreport)))

Return lblb_rtfreport

"Bruce Armstrong" <NOCANSPAM_bruce.armstrong@yahoo.com> wrote in message
news:dgaea5loql36po72301oehb52b2ac1jc2c@4ax.com...
>
> I routinely paste much more RTF data than that, but I also don't
> specify the band that I'm inserting into.
>
> Given that the limit that you're running into is almost exactly half
> the size of the limit of an int (32767), I'm thinking you may have an
> variable somewhere that is limiting the size of the data to 32K or so.
>
> I'd suggest taking a second look at "a function that retrieves the
> data from the DB."
>
> On 8 Sep 2009 15:40:21 -0700, "Don" <dmcquade@dmapros.com> wrote:
>
> >The app is PB 10.5.2 and the DB driver is SQL Server ODBC v
2000.85.1117.00.
> >
> >I did a test by adding the LEN command on the blob and can see that it
> >appears to be the correct size. I also calculate the return value of the
> >PasteRTF command which returns the same length. If the blob is of a
certain
> >size or larger, it appears as if it is not pasting into the RTE control.
The
> >control is empty after running the PasteRTF command even though the
return
> >value is 16385.
> >
> >Thanks
> >Don
> >
> >
> >"Chris Pollach" <cpollach@travel-net.com> wrote in message
> >news:4aa695c4@forums-1-dub...
> >> Hi Don;
> >>
> >> Are you sure that the document is not being cut-off in the Blob? By
> >that
> >> I mean in your SS connection DBParm field - do you have the
> >> "PBMaxBlobSize=nnnn" setting set to a reasonable value. Now this will
also
> >> depend on the DB Driver you are using as well.
> >>
> >> Can you tell use the driver and PB version you are using?
> >>
> >> --
> >> Regards ... Chris
> >> ISUG - NA RUG Director
> >> http://chrispollach.pbdjmagazine.com
> >>
> >>
> >> "Don" <dmcquade@dmapros.com> wrote in message
> >> news:4aa5d603$1@forums-1-dub...
> >> >I have a RTE control on a tabpage in a PB 10.5 app. I retrieve data
from
> >a
> >> > varbinary column in a MS SQL 2005 DB into a blob variable which is
then
> >> > pasted into the RTE control using the PasteRTF command. This seems to
> >work
> >> > for data that is of a limited size (roughtly 4 pages or less).
Anything
> >> > larger does not display. I tested the result of the PasteRTF command
> >which
> >> > appears to be the size of the varbinary column data. Here is the code
I
> >am
> >> > using to get the data into the control:
> >> >
> >> > Long ll_rtn
> >> > Blob lblb_report
> >> >
> >> > lblb_report = a function that retrieves the data from the DB.
> >> >
> >> > rte_control.SelectTextAll()
> >> > ll_rtn = rte_Control.PasteRTF(String(lblb_report), Detail!)
> >> >
> >> > Any help on why a large RTF doc does not display when pasted into the
> >> > control would be greatly appreciated. If anyone has any suggestions
on
> >how
> >> > to allow manipulation of RTF data is also welcomed.
> >> >
> >> > Don
> >> >
> >> >
> >>
> >>
> >
> -----------------------------------
>
> My Web 2.0 Stuff
>
> Blog: http://bruce.pbdjmagazine.com/
> Facebook: http://www.facebook.com/people/Bruce-Armstrong/1600223798
> Fotki: http://public.fotki.com/brucearmstrong/
> LinkedIn: http://www.linkedin.com/in/bruceaarmstrong
> Twitter: http://twitter.com/bruce_armstrong
> YouTube: http://www.youtube.com/user/brucearmstrong


Bruce Armstrong Posted on 2009-09-10 04:28:26.0Z
From: Bruce Armstrong <NOCANSPAM_bruce.armstrong@yahoo.com>
Newsgroups: sybase.public.powerbuilder.rte
Subject: Re: PasteRTF limitations and RTE control
Reply-To: NOCANSPAM_bruce.armstrong@yahoo.com
Message-ID: <fqvga5t2rk3gd3db0kh4tgaq6cclq2aaop@4ax.com>
References: <4aa5d603$1@forums-1-dub> <4aa695c4@forums-1-dub> <4aa6dd55@forums-1-dub> <dgaea5loql36po72301oehb52b2ac1jc2c@4ax.com> <4aa85aba$1@forums-1-dub>
X-Newsreader: Forte Agent 5.00/32.1171
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Date: 9 Sep 2009 21:28:26 -0700
X-Trace: forums-1-dub 1252556906 10.22.241.152 (9 Sep 2009 21:28:26 -0700)
X-Original-Trace: 9 Sep 2009 21:28:26 -0700, vip152.sybase.com
Lines: 158
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.rte:308
Article PK: 761978

When you use an ODBC driver, PB uses it's PBODB???.INI file (where ???
is the PB version number) to determine a number of settings it uses.
One of them, for MS SQL Server, is the maximum size of a blob. It
defaults to 32K

PBMaxBlobSize='32767'

If you change that to a somewhat more reasonable number, you'll start
getting all of your blobs and your PasteRTFs will start working.

The reason that you're getting half the data is likely an ANSI/Unicode
issue (it takes twice as many bytes to represent the data in Unicode
as it does in ANSI).

On 9 Sep 2009 18:47:38 -0700, "Don" <dmcquade@dmapros.com> wrote:

>You are correct. I added a line in the function to calculate the length of
>the blob returned and it is exactly 32787. The return value of the PasteRTF
>command seems to always be half that length. I don't limit the size of the
>blob variable and do not have a DB connection parameter that looks like it
>limits the size. Here is the code for the function:
>
>Blob lblb_rtfreport
>
>Transaction trans_blob
>trans_blob = CREATE transaction
>String ls_database = "Connectstring='DSN=MyDB;'"
>trans_blob.DBMS = "ODBC"
>trans_blob.DBParm = ls_database
>trans_blob.AutoCommit = True
>CONNECT USING trans_blob ;
>
>SELECTBLOB reports_file
> INTO :lblb_rtfreport
> FROM tbl_reports
> WHERE reports_id = :arg_reportid
> USING trans_blob ;
>
>DISCONNECT USING trans_blob ;
>
>/* Test the length of the blob variable retrieved */
>messagebox('test', String(Len(lblb_rtfreport)))
>
>Return lblb_rtfreport
>
>
>
>"Bruce Armstrong" <NOCANSPAM_bruce.armstrong@yahoo.com> wrote in message
>news:dgaea5loql36po72301oehb52b2ac1jc2c@4ax.com...
>>
>> I routinely paste much more RTF data than that, but I also don't
>> specify the band that I'm inserting into.
>>
>> Given that the limit that you're running into is almost exactly half
>> the size of the limit of an int (32767), I'm thinking you may have an
>> variable somewhere that is limiting the size of the data to 32K or so.
>>
>> I'd suggest taking a second look at "a function that retrieves the
>> data from the DB."
>>
>> On 8 Sep 2009 15:40:21 -0700, "Don" <dmcquade@dmapros.com> wrote:
>>
>> >The app is PB 10.5.2 and the DB driver is SQL Server ODBC v
>2000.85.1117.00.
>> >
>> >I did a test by adding the LEN command on the blob and can see that it
>> >appears to be the correct size. I also calculate the return value of the
>> >PasteRTF command which returns the same length. If the blob is of a
>certain
>> >size or larger, it appears as if it is not pasting into the RTE control.
>The
>> >control is empty after running the PasteRTF command even though the
>return
>> >value is 16385.
>> >
>> >Thanks
>> >Don
>> >
>> >
>> >"Chris Pollach" <cpollach@travel-net.com> wrote in message
>> >news:4aa695c4@forums-1-dub...
>> >> Hi Don;
>> >>
>> >> Are you sure that the document is not being cut-off in the Blob? By
>> >that
>> >> I mean in your SS connection DBParm field - do you have the
>> >> "PBMaxBlobSize=nnnn" setting set to a reasonable value. Now this will
>also
>> >> depend on the DB Driver you are using as well.
>> >>
>> >> Can you tell use the driver and PB version you are using?
>> >>
>> >> --
>> >> Regards ... Chris
>> >> ISUG - NA RUG Director
>> >> http://chrispollach.pbdjmagazine.com
>> >>
>> >>
>> >> "Don" <dmcquade@dmapros.com> wrote in message
>> >> news:4aa5d603$1@forums-1-dub...
>> >> >I have a RTE control on a tabpage in a PB 10.5 app. I retrieve data
>from
>> >a
>> >> > varbinary column in a MS SQL 2005 DB into a blob variable which is
>then
>> >> > pasted into the RTE control using the PasteRTF command. This seems to
>> >work
>> >> > for data that is of a limited size (roughtly 4 pages or less).
>Anything
>> >> > larger does not display. I tested the result of the PasteRTF command
>> >which
>> >> > appears to be the size of the varbinary column data. Here is the code
>I
>> >am
>> >> > using to get the data into the control:
>> >> >
>> >> > Long ll_rtn
>> >> > Blob lblb_report
>> >> >
>> >> > lblb_report = a function that retrieves the data from the DB.
>> >> >
>> >> > rte_control.SelectTextAll()
>> >> > ll_rtn = rte_Control.PasteRTF(String(lblb_report), Detail!)
>> >> >
>> >> > Any help on why a large RTF doc does not display when pasted into the
>> >> > control would be greatly appreciated. If anyone has any suggestions
>on
>> >how
>> >> > to allow manipulation of RTF data is also welcomed.
>> >> >
>> >> > Don
>> >> >
>> >> >
>> >>
>> >>
>> >
>> -----------------------------------
>>
>> My Web 2.0 Stuff
>>
>> Blog: http://bruce.pbdjmagazine.com/
>> Facebook: http://www.facebook.com/people/Bruce-Armstrong/1600223798
>> Fotki: http://public.fotki.com/brucearmstrong/
>> LinkedIn: http://www.linkedin.com/in/bruceaarmstrong
>> Twitter: http://twitter.com/bruce_armstrong
>> YouTube: http://www.youtube.com/user/brucearmstrong
>

-----------------------------------

My Web 2.0 Stuff

Blog: http://bruce.pbdjmagazine.com/
Facebook: http://www.facebook.com/people/Bruce-Armstrong/1600223798
Fotki: http://public.fotki.com/brucearmstrong/
LinkedIn: http://www.linkedin.com/in/bruceaarmstrong
Twitter: http://twitter.com/bruce_armstrong
YouTube: http://www.youtube.com/user/brucearmstrong


Don Posted on 2009-09-11 00:50:46.0Z
From: "Don" <dmcquade@dmapros.com>
Newsgroups: sybase.public.powerbuilder.rte
References: <4aa5d603$1@forums-1-dub> <4aa695c4@forums-1-dub> <4aa6dd55@forums-1-dub> <dgaea5loql36po72301oehb52b2ac1jc2c@4ax.com> <4aa85aba$1@forums-1-dub> <fqvga5t2rk3gd3db0kh4tgaq6cclq2aaop@4ax.com>
Subject: Re: PasteRTF limitations and RTE control
Lines: 183
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4aa99ee6@forums-1-dub>
Date: 10 Sep 2009 17:50:46 -0700
X-Trace: forums-1-dub 1252630246 10.22.241.152 (10 Sep 2009 17:50:46 -0700)
X-Original-Trace: 10 Sep 2009 17:50:46 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.rte:309
Article PK: 761979

Thanks!

That was it. I increased that to a larger value and everything worked
perfectly.

Thanks again
Don

"Bruce Armstrong" <NOCANSPAM_bruce.armstrong@yahoo.com> wrote in message
news:fqvga5t2rk3gd3db0kh4tgaq6cclq2aaop@4ax.com...
>
> When you use an ODBC driver, PB uses it's PBODB???.INI file (where ???
> is the PB version number) to determine a number of settings it uses.
> One of them, for MS SQL Server, is the maximum size of a blob. It
> defaults to 32K
>
> PBMaxBlobSize='32767'
>
> If you change that to a somewhat more reasonable number, you'll start
> getting all of your blobs and your PasteRTFs will start working.
>
> The reason that you're getting half the data is likely an ANSI/Unicode
> issue (it takes twice as many bytes to represent the data in Unicode
> as it does in ANSI).
>
> On 9 Sep 2009 18:47:38 -0700, "Don" <dmcquade@dmapros.com> wrote:
>
> >You are correct. I added a line in the function to calculate the length
of
> >the blob returned and it is exactly 32787. The return value of the
PasteRTF
> >command seems to always be half that length. I don't limit the size of
the
> >blob variable and do not have a DB connection parameter that looks like
it
> >limits the size. Here is the code for the function:
> >
> >Blob lblb_rtfreport
> >
> >Transaction trans_blob
> >trans_blob = CREATE transaction
> >String ls_database = "Connectstring='DSN=MyDB;'"
> >trans_blob.DBMS = "ODBC"
> >trans_blob.DBParm = ls_database
> >trans_blob.AutoCommit = True
> >CONNECT USING trans_blob ;
> >
> >SELECTBLOB reports_file
> > INTO :lblb_rtfreport
> > FROM tbl_reports
> > WHERE reports_id = :arg_reportid
> > USING trans_blob ;
> >
> >DISCONNECT USING trans_blob ;
> >
> >/* Test the length of the blob variable retrieved */
> >messagebox('test', String(Len(lblb_rtfreport)))
> >
> >Return lblb_rtfreport
> >
> >
> >
> >"Bruce Armstrong" <NOCANSPAM_bruce.armstrong@yahoo.com> wrote in message
> >news:dgaea5loql36po72301oehb52b2ac1jc2c@4ax.com...
> >>
> >> I routinely paste much more RTF data than that, but I also don't
> >> specify the band that I'm inserting into.
> >>
> >> Given that the limit that you're running into is almost exactly half
> >> the size of the limit of an int (32767), I'm thinking you may have an
> >> variable somewhere that is limiting the size of the data to 32K or so.
> >>
> >> I'd suggest taking a second look at "a function that retrieves the
> >> data from the DB."
> >>
> >> On 8 Sep 2009 15:40:21 -0700, "Don" <dmcquade@dmapros.com> wrote:
> >>
> >> >The app is PB 10.5.2 and the DB driver is SQL Server ODBC v
> >2000.85.1117.00.
> >> >
> >> >I did a test by adding the LEN command on the blob and can see that it
> >> >appears to be the correct size. I also calculate the return value of
the
> >> >PasteRTF command which returns the same length. If the blob is of a
> >certain
> >> >size or larger, it appears as if it is not pasting into the RTE
control.
> >The
> >> >control is empty after running the PasteRTF command even though the
> >return
> >> >value is 16385.
> >> >
> >> >Thanks
> >> >Don
> >> >
> >> >
> >> >"Chris Pollach" <cpollach@travel-net.com> wrote in message
> >> >news:4aa695c4@forums-1-dub...
> >> >> Hi Don;
> >> >>
> >> >> Are you sure that the document is not being cut-off in the Blob?
By
> >> >that
> >> >> I mean in your SS connection DBParm field - do you have the
> >> >> "PBMaxBlobSize=nnnn" setting set to a reasonable value. Now this
will
> >also
> >> >> depend on the DB Driver you are using as well.
> >> >>
> >> >> Can you tell use the driver and PB version you are using?
> >> >>
> >> >> --
> >> >> Regards ... Chris
> >> >> ISUG - NA RUG Director
> >> >> http://chrispollach.pbdjmagazine.com
> >> >>
> >> >>
> >> >> "Don" <dmcquade@dmapros.com> wrote in message
> >> >> news:4aa5d603$1@forums-1-dub...
> >> >> >I have a RTE control on a tabpage in a PB 10.5 app. I retrieve data
> >from
> >> >a
> >> >> > varbinary column in a MS SQL 2005 DB into a blob variable which is
> >then
> >> >> > pasted into the RTE control using the PasteRTF command. This seems
to
> >> >work
> >> >> > for data that is of a limited size (roughtly 4 pages or less).
> >Anything
> >> >> > larger does not display. I tested the result of the PasteRTF
command
> >> >which
> >> >> > appears to be the size of the varbinary column data. Here is the
code
> >I
> >> >am
> >> >> > using to get the data into the control:
> >> >> >
> >> >> > Long ll_rtn
> >> >> > Blob lblb_report
> >> >> >
> >> >> > lblb_report = a function that retrieves the data from the DB.
> >> >> >
> >> >> > rte_control.SelectTextAll()
> >> >> > ll_rtn = rte_Control.PasteRTF(String(lblb_report), Detail!)
> >> >> >
> >> >> > Any help on why a large RTF doc does not display when pasted into
the
> >> >> > control would be greatly appreciated. If anyone has any
suggestions
> >on
> >> >how
> >> >> > to allow manipulation of RTF data is also welcomed.
> >> >> >
> >> >> > Don
> >> >> >
> >> >> >
> >> >>
> >> >>
> >> >
> >> -----------------------------------
> >>
> >> My Web 2.0 Stuff
> >>
> >> Blog: http://bruce.pbdjmagazine.com/
> >> Facebook: http://www.facebook.com/people/Bruce-Armstrong/1600223798
> >> Fotki: http://public.fotki.com/brucearmstrong/
> >> LinkedIn: http://www.linkedin.com/in/bruceaarmstrong
> >> Twitter: http://twitter.com/bruce_armstrong
> >> YouTube: http://www.youtube.com/user/brucearmstrong
> >
> -----------------------------------
>
> My Web 2.0 Stuff
>
> Blog: http://bruce.pbdjmagazine.com/
> Facebook: http://www.facebook.com/people/Bruce-Armstrong/1600223798
> Fotki: http://public.fotki.com/brucearmstrong/
> LinkedIn: http://www.linkedin.com/in/bruceaarmstrong
> Twitter: http://twitter.com/bruce_armstrong
> YouTube: http://www.youtube.com/user/brucearmstrong