?
Solved

Stream Image from MSSQL to rtf String

Posted on 2011-05-09
3
Medium Priority
?
347 Views
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



EG
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?
0
Comment
Question by:isaackhazi
  • 2
3 Comments
 
LVL 16

Expert Comment

by:Kalpesh Chhatrala
ID: 35726059
0
 
LVL 16

Expert Comment

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

http://www.codeguru.com/columns/dotnettips/article.php/c7529
0
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 2000 total points
ID: 35727889
You would load the image from Sql Server
http://www.atalasoft.com/KB/article.aspx?id=10018

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

http://vbdotnetforum.com/index.php?/topic/27-adding-image-to-richtextbox/
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In this article I will describe the Detach & Attach method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
This shares a stored procedure to retrieve permissions for a given user on the current database or across all databases on a server.
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…

830 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