Stream Image from MSSQL to rtf String

Posted on 2011-05-09
Last Modified: 2012-05-11
I have images stored in my table in a column of data type "IMAGE"

In my VB.NET app I am dynamically formatting RTF text in a string and assigining the string to a RichText Edit Control.

Finally beforing assigning the String to the RichEditControl, I want to add an image stored as binary data(IMAGE ) from the database

RtfText+= "{\rtf1\deff0{\fonttbl{\f0 Times New Roman;}}{\colortbl\red0\green0\blue0 ;\red0\green0\blue255 ;}{\*\listoverridetable}{\stylesheet {\ql\cf0 Normal;}{\*\cs1\cf0 Default Paragraph Font;}{\*\cs2\sbasedon1\cf0 Line Number;}{\*\cs3\ul\cf1 Hyperlink;}}\sectd\pard\plain\ql\par\pard\plain\ql\par\pard\plain\ql\par\pard\plain\ql\par\pard\plain\ql\par\pard\plain\ql\par\pard\plain\ql\par\pard\plain\ql\par\pard\plain\ql\par\pard\plain\ql\par\pard\plain\ql\par\pard\plain\ql\par\pard\plain\ql\par\pard\plain\ql\par\pard\plain\ql\par\pard\plain\ql\par\pard\plain\ql\par\pard\plain\ql\par\pard\plain\ql{\*\shppict{\pict\jpegblip\picw5080\pich5080\picwgoal2880\pichgoal2880\picscalex100\picscaley100"

How Do i go about doind that?
Question by:isaackhazi
    LVL 16

    Expert Comment

    by:Kalpesh Chhatrala
    LVL 16

    Expert Comment

    by:Kalpesh Chhatrala
    you can check also another sample code to Store RTF to SQL Server
    LVL 83

    Accepted Solution

    You would load the image from Sql Server

    and then, using the clipboard, paste it into the richtextbox

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    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

    Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
    It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…

    737 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

    20 Experts available now in Live!

    Get 1:1 Help Now