473,795 Members | 3,428 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Save RTF with graphics to SQL server

Al
Hi,
I am trying to Save a RTF that contains graphics to SQL
server. Doesn't anyone know a VB code to do that?

Thanks

Al

Nov 20 '05 #1
4 5106
RTF is just text with text markup.
As long as the images are EMBEDDED in the RTF you can just write the RTF to
any character-type field in SQL (although the data is bound to be HUGE). If
the image is Linked, then you are screwed. You will have to find the image
via the link and write it into the database (alhtough I usually don't really
recommend keeping image data in a database to be honest).

-Rob Teixeira [MVP]

"Al" <me**********@y ahoo.com> wrote in message
news:03******** *************** *****@phx.gbl.. .
Hi,
I am trying to Save a RTF that contains graphics to SQL
server. Doesn't anyone know a VB code to do that?

Thanks

Al

Nov 20 '05 #2
Thanks but i need to save RichTextBox that contiains
embeded graphics to SQL server. when i try to save it to
a chracter type filed I get error. I am looking for a
routine to do that.

Al
-----Original Message-----
RTF is just text with text markup.
As long as the images are EMBEDDED in the RTF you can just write the RTF toany character-type field in SQL (although the data is bound to be HUGE). Ifthe image is Linked, then you are screwed. You will have to find the imagevia the link and write it into the database (alhtough I usually don't reallyrecommend keeping image data in a database to be honest).

-Rob Teixeira [MVP]

"Al" <me**********@y ahoo.com> wrote in message
news:03******* *************** ******@phx.gbl. ..
Hi,
I am trying to Save a RTF that contains graphics to SQL
server. Doesn't anyone know a VB code to do that?

Thanks

Al

.

Nov 20 '05 #3
What error are you getting?
Might also be useful to see the code you are using to input the value to the
database.

-Rob Teixeira [MVP]

<an*******@disc ussions.microso ft.com> wrote in message
news:03******** *************** *****@phx.gbl.. .
Thanks but i need to save RichTextBox that contiains
embeded graphics to SQL server. when i try to save it to
a chracter type filed I get error. I am looking for a
routine to do that.

Al
-----Original Message-----
RTF is just text with text markup.
As long as the images are EMBEDDED in the RTF you can

just write the RTF to
any character-type field in SQL (although the data is

bound to be HUGE). If
the image is Linked, then you are screwed. You will have

to find the image
via the link and write it into the database (alhtough I

usually don't really
recommend keeping image data in a database to be honest).

-Rob Teixeira [MVP]

"Al" <me**********@y ahoo.com> wrote in message
news:03******* *************** ******@phx.gbl. ..
Hi,
I am trying to Save a RTF that contains graphics to SQL
server. Doesn't anyone know a VB code to do that?

Thanks

Al

.

Nov 20 '05 #4
* <an*******@disc ussions.microso ft.com> scripsit:
Thanks but i need to save RichTextBox that contiains
embeded graphics to SQL server. when i try to save it to
a chracter type filed I get error. I am looking for a
routine to do that.


"Post code!"

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
626
by: F. Hall | last post by:
If I read a bitmap image from one file and save it to another the save operation is slow unless I draw on the image. In other words, Image inputImage = Image.FromFile( @"c:\temp\source.bmp" ); using ( Graphics g = Graphics.FromImage( inputImage ) ) { g.DrawLine( new Pen(Brushes.White), 0, 0, 1, 1 ); } inputImage.Save( @"c:\temp\sink.bmp", ImageFormat.Bmp );
6
61760
by: charsh | last post by:
Hi, I using the code below to draw a text in a pictureBox1. //Start--------------------------------------------------------------- private void button1_Click(object sender, System.EventArgs e) { Graphics g; g = pictureBox1.CreateGraphics(); g.FillRectangle(Brushes.White,0,0,160,160);
12
57335
by: yaya via DotNetMonster.com | last post by:
Hi, I have a picture box with circles and rectangles, and I wana save all the images into a jpg file, i tried pictureBox1.Image.Save(@"c:\1.jpg"); but I got and error "System.NullReferenceException: Object reference not set to an instance of an object." Can anyone help? Thanks... --
1
6496
by: WB | last post by:
Hi, I have a helper class that has a method to resize images. It takes the virtual path of an image and resize it to a specified dimension like this. public void ResizeImageTest(string pathImage, int newDimension) { string pathImageOnDisk = System.Web.HttpContext.Current.Server.MapPath(pathImage); System.IO.FileStream fs = new System.IO.FileStream(pathImageOnDisk,
1
4171
by: Hardy Wang | last post by:
Hi, I found a piece of code to add drop shadow to a photo like below, after I save the image, it is actually a BMP file even though I specify a JPG file extension (see http://img140.imageshack.us/my.php?image=resized11wz.jpg). If I force to save in JPG format (see the commented line), then the whole shadow is a messup (see http://img70.imageshack.us/my.php?image=resized29cy.jpg). I am just wandering are there any attributes / formats...
12
4047
by: Lee | last post by:
I have the following code using System; using System.Windows.Forms; using System.Drawing; using System.Collections; namespace FINN {
13
2304
by: Joe | last post by:
does anyone know why this source code throws an error?? Dim myBitmap As System.Drawing.Bitmap Dim myGraphics As Graphics myBitmap = New System.Drawing.Bitmap(fileName:="C:\test.tif") myGraphics = PictureBox1.CreateGraphics Dim expansionRectangle As New Rectangle(25, 550, 1000, 350) Dim destRectangle1 As New Rectangle(0, 0, 1000, 350) myGraphics.DrawImage(myBitmap, destRectangle1, expansionRectangle,
0
1347
by: phanibiddu | last post by:
How to draw on windows form and save it as Jpeg file I am trying with this code but not comming public Form3() { InitializeComponent(); //rnd = new Random((int)DateTime.Now.Ticks); // seeded with ticks myPen = new Pen(Color.Red);
10
7429
by: eddie tan | last post by:
Hi, I have a picturebox with graphics drawn from different objects. In one object I used Pen P1; P1 = new Pen(Color.Blue, 3); Graphics g = null; g = Graphics.FromImage(image.Image); g.DrawPath(P1, Wirepath);
0
10437
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10214
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10164
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10001
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9042
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6780
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3723
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2920
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.