Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to Read RTF data stored in text datatype in Sybase database using stored procedure?

Posted on 2009-05-05
2
Medium Priority
?
942 Views
Last Modified: 2012-05-06
Dear Sir/Madam,

How can i read RTF data  to string stored in text data column from stored procedure.
Format of data in text column is as shown below

select code, t_stdremark from tbl1

{\rtf1\ansi\deff0{\fonttbl{\f0\froman Tms Rmn;}{\f1\froman Times New Roman;}}{\colortbl\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue127;\red0\green127\blue127;\red0\green127\blue0;\red127\green0\blue127;\red127\green0\blue0;\red127\green127\blue0;\red127\green127\blue127;\red192\green192\blue192;}{\info{\creatim\yr1998\mo12\dy31\hr12\min56\sec52}{\pr
output of following needs to be readable characters.

Regards
Raghavendra
0
Comment
Question by:gladrags76
2 Comments
 
LVL 19

Accepted Solution

by:
grant300 earned 500 total points
ID: 24308620
You generally cannot do this from a stored procedure unless you can guarantee that the length of the text field is always << 16K bytes long and you are using ASE v12.5.1 or higher.  Under any other circumstances, you will have to write a client application that knows how to handle a CLOB field and deal with it that way.

What does your client application look like?  Is it VB orJava or C++ or C# or Delphi or something else?

There is no facility within T-SQL or ISQL to interpret and display RTF even if you can get it formatted into a string.

Regards,
Bill
0
 

Author Comment

by:gladrags76
ID: 24343807
Dear Bill,

As you suggested i was able to do with  client application.Client Application used is Powerbuilder.
In Powerbuilder RTEcontrol there is  a function called selecttext() which returns string from the RTF control.

Thank you for your time.

Regards
Raghavendra
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft's Excel has many features that most people will never need nor take advantage of.  Conditional formatting is one feature that you may find a necessity once you start using it.
In this post, I will showcase the steps for how to create groups in Office 365. Office 365 groups allow for ease of flexibility and collaboration between staff members.
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses
Course of the Month12 days, 12 hours left to enroll

971 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question