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.

Save RTE control data to BLOB column

5 posts in Last posting was on 2009-09-08 17:41:14.0Z
Don Posted on 2009-07-04 02:28:41.0Z
From: "Don" <dmcquade@dmapros.com>
Newsgroups: sybase.public.powerbuilder.rte
Subject: Save RTE control data to BLOB column
Lines: 26
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: <4a4ebe59$1@forums-3-dub.sybase.com>
Date: 3 Jul 2009 19:28:41 -0700
X-Trace: forums-3-dub.sybase.com 1246674521 10.22.241.152 (3 Jul 2009 19:28:41 -0700)
X-Original-Trace: 3 Jul 2009 19:28:41 -0700, vip152.sybase.com
Path: forums-1-dub!forums-master!forums-3-dub.sybase.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.rte:269
Article PK: 791857

I have an RTE control that allows the user to edit a report. I want to put
an option (command button) to save the report to a blob column in a table
but having difficulty. The record within the table containing the BLOB
column already exists. I just need to update the BLOB column. It is
originally NULL.

The code I have within the save command button is as follows:

Parent.rte_control1.SelectTextAll()
Parent.rte_control1.CopyRTF()
blob_report = Blob( Clipboard() )

UPDATEBLOB table_2
SET blob_col = :blob_report
WHERE reportid = :gd_report_id ;

It appears that the record contains the string "gd_report_id" when I view
the table data.

Any help would be appreciated. I am running PB 10.5

Thanks
Don


Don Posted on 2009-07-04 12:55:44.0Z
From: "Don" <dmcquade@dmapros.com>
Newsgroups: sybase.public.powerbuilder.rte
References: <4a4ebe59$1@forums-3-dub.sybase.com>
Subject: Re: Save RTE control data to BLOB column
Lines: 60
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: <4a4f5150@forums-3-dub.sybase.com>
Date: 4 Jul 2009 05:55:44 -0700
X-Trace: forums-3-dub.sybase.com 1246712144 10.22.241.152 (4 Jul 2009 05:55:44 -0700)
X-Original-Trace: 4 Jul 2009 05:55:44 -0700, vip152.sybase.com
Path: forums-1-dub!forums-master!forums-3-dub.sybase.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.rte:270
Article PK: 761961

I got the data to save to to the table using the following code:

blob_report = Blob(Parent.rte_control1.CopyRTF(False) )
If IsNull(blob_report) OR trim(string(blob_report)) = '' Then
UPDATE table_2 SET blob_col = NULL
WHERE reportid = :gd_report_id ;
Else
UPDATEBLOB table_2 SET blob_col = :blob_report
WHERE reportid = :gd_report_id ;
End If

Now I am trying to retrieve the data into the RTE control when the user
returns to that page. Here is the code I am using:

Blob blob_report

SELECTBLOB blob_col
INTO :blob_report
FROM table_2
WHERE reportid = :gd_report_id
USING SQLCA ;

rte_control1.SelectTextAll()
rte_control1.PasteRTF(String(blob_report))

The RTE control remains blank. I checked the SQL Code which is successful so
I know it retrieved the column into the blob variable.

Thanks
Don

"Don" <dmcquade@dmapros.com> wrote in message
news:4a4ebe59$1@forums-3-dub.sybase.com...
> I have an RTE control that allows the user to edit a report. I want to put
> an option (command button) to save the report to a blob column in a table
> but having difficulty. The record within the table containing the BLOB
> column already exists. I just need to update the BLOB column. It is
> originally NULL.
>
> The code I have within the save command button is as follows:
>
> Parent.rte_control1.SelectTextAll()
> Parent.rte_control1.CopyRTF()
> blob_report = Blob( Clipboard() )
>
> UPDATEBLOB table_2
> SET blob_col = :blob_report
> WHERE reportid = :gd_report_id ;
>
> It appears that the record contains the string "gd_report_id" when I view
> the table data.
>
> Any help would be appreciated. I am running PB 10.5
>
> Thanks
> Don
>
>
>


Scott Posted on 2009-09-03 16:27:24.0Z
Sender: 546.4a9fdbfd.1804289383@sybase.com
From: Scott
Newsgroups: sybase.public.powerbuilder.rte
Subject: Re: Save RTE control data to BLOB column
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4a9fee6c.93f.1681692777@sybase.com>
References: <4a4ebe59$1@forums-3-dub.sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 3 Sep 2009 09:27:24 -0700
X-Trace: forums-1-dub 1251995244 10.22.241.41 (3 Sep 2009 09:27:24 -0700)
X-Original-Trace: 3 Sep 2009 09:27:24 -0700, 10.22.241.41
Lines: 2
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.rte:299
Article PK: 761973

Are you using a BLOB or a CLOB as the database data type?


Don Posted on 2009-09-05 23:56:40.0Z
From: "Don" <dmcquade@dmapros.com>
Newsgroups: sybase.public.powerbuilder.rte
References: <4a4ebe59$1@forums-3-dub.sybase.com> <4a9fee6c.93f.1681692777@sybase.com>
Subject: Re: Save RTE control data to BLOB column
Lines: 10
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: <4aa2fab8@forums-1-dub>
Date: 5 Sep 2009 16:56:40 -0700
X-Trace: forums-1-dub 1252195000 10.22.241.152 (5 Sep 2009 16:56:40 -0700)
X-Original-Trace: 5 Sep 2009 16:56:40 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.rte:301
Article PK: 761975

The DB is MS SQL 2005 and I am using a column type of varbinary.

Thanks
Don

<Scott> wrote in message news:4a9fee6c.93f.1681692777@sybase.com...
> Are you using a BLOB or a CLOB as the database data type?


Chris Pollach Posted on 2009-09-08 17:41:14.0Z
From: "Chris Pollach" <cpollach@travel-net.com>
Newsgroups: sybase.public.powerbuilder.rte
References: <4a4ebe59$1@forums-3-dub.sybase.com>
Subject: Re: Save RTE control data to BLOB column
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: <4aa6973a$1@forums-1-dub>
Date: 8 Sep 2009 10:41:14 -0700
X-Trace: forums-1-dub 1252431674 10.22.241.152 (8 Sep 2009 10:41:14 -0700)
X-Original-Trace: 8 Sep 2009 10:41:14 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.rte:304
Article PK: 791877

Hi Don;

Suggestion: Why not use a RichText DataWindow and the DWO will take
catre of all of this for you?
Then all you need is the Retrieve ( ) and Update ( ) commands. :-)

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

"Don" <dmcquade@dmapros.com> wrote in message
news:4a4ebe59$1@forums-3-dub.sybase.com...
>I have an RTE control that allows the user to edit a report. I want to put
> an option (command button) to save the report to a blob column in a table
> but having difficulty. The record within the table containing the BLOB
> column already exists. I just need to update the BLOB column. It is
> originally NULL.
>
> The code I have within the save command button is as follows:
>
> Parent.rte_control1.SelectTextAll()
> Parent.rte_control1.CopyRTF()
> blob_report = Blob( Clipboard() )
>
> UPDATEBLOB table_2
> SET blob_col = :blob_report
> WHERE reportid = :gd_report_id ;
>
> It appears that the record contains the string "gd_report_id" when I view
> the table data.
>
> Any help would be appreciated. I am running PB 10.5
>
> Thanks
> Don
>
>
>