Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

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
?
933 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

Question has a verified solution.

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

Read on to get a few ideas on how to promote your next corporate event.
By default Outlook 2016 displays only one time zone in the Calendar. The following article explains how to display two time zones in one calendar view.
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

715 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