Solved

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

Posted on 2009-05-05
2
913 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 125 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Help with SQL query 3 2,184
Crystal Reports VB6 11 1,020
Cluster Resource error 3 47
Query: Was the data in the Table inserted in ascending order? 11 90
Moving applications to the cloud or switching services to cloud-based ones, is a stressful job.  Here's how you can make it easier.
Is your company's data protection keeping pace with virtualization? Here are 7 dynamic ways to adapt to rapid breakthroughs in technology.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

747 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now