Solved

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

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

 Database Backup and Recovery Best Practices

Join Percona’s, Architect, Manjot Singh as he presents Database Backup and Recovery Best Practices (with a Focus on MySQL) on Thursday, July 27, 2017 at 11:00 am PDT / 2:00 pm EDT (UTC-7). In the case of a failure, do you know how long it will take to restore your database?

Question has a verified solution.

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

Getting to know the threat landscape in which DDoS has evolved, and making the right choice to get ourselves geared up to defend against  DDoS attacks effectively. Get the necessary preparation works done and focus on Doing the First Things Right.
Microsoft Office 365 is a subscriptions based service which includes services like Exchange Online and Skype for business Online. These services integrate with Microsoft's online version of Active Directory called Azure Active Directory.
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

635 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