Click here to Skip to main content
16,004,564 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i m converting text to image.....in which i m succesfully created the bitmap.....but m not able to store in database with datatype image.....I m getting the same bits for different images in tresulted database....plz help me out as soon as possible
Posted
Updated 9-Jun-14 0:05am
v3
Comments
Kornfeld Eliyahu Peter 9-Jun-14 5:39am    
You should use Google - http://www.akadia.com/services/dotnet_read_write_blob.html

1 solution

to store image in database you need to convert it to array of bytes:

MemoryStream ms = new MemoryStream();
image.Save(ms,System.Drawing.Imaging.ImageFormat.Gif);

then send the ms to database like this:
ms.ToArray();
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900