Solved

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

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Problems writing binary files to Sybase from PHP 2 189
Clean up a mailbox 5 161
Session that filled up my transaction logs 1 66
sybase output only middle rows 4 33
A project that enables an administrator to perform actions within a user session context not just at the time of login but any time later on day(s) or week(s) later.
In threads here at EE, each comment has a unique Identifier (ID). It is easy to get the full path for an ID via the right-click context menu. However, we often want to post a short link within a thread rather than the full link. This article shows a…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

828 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