Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How to store jpeg / gif / bmp image in database and how to
retrieve them? The most stressful condition is database is
distributed and stored images can be retrive from any
computer in network and any one can store images from other
computer!! plss help its urgent.......RAHUL RATHOD

Answer Posted / raj

Hi Rahul,
if you want to save image in SQL Server DataBase,
first we have to convert that image into bytes(BCoz SQL
Server support byte format).
using system.io.iostream we can convert image into stream
of bytes.

For example :

stfFilename is path that contain your image.

Public Shared Function LoadImage(ByVal stfFilename As
String) As System.Drawing.Image

Dim oStream As System.IO.Stream
Dim oAssembly As System.Reflection.Assembly
oAssembly = System.Reflection.Assembly.GetEntryAssembly
oStream = oAssembly.GetManifestResourceStream(stfFilename)
Return System.Drawing.Image.FromStream(oStream)
End Function

for retrieving image from DB just reverse concept.

Is This Answer Correct ?    4 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain option explicit?

959


Can you please explain the difference between authentication and authorization?

976


what is interface and when it is used?

2219


What is sorting in vb?

834


Explain code security?

863


Observations between vb.net and vc#.net?

998


What is the use of console application?

1043


Explain how can we remove handlers at run time?

950


Which class allows an element to be accessed using unique key?

909


Explain about the ruby interface generator?

931


What is the top .net class that everything is derived from?

1005


How do you retrieve the customized properties of a .net application from xml .config file?

925


What is misl code?

991


What is break mode? What are the options to step through code?

1001


hello thank you for replying to my question regarding adding barcode fonts in vb.net project. I have downloaded a free font and added in my vb.net project but now i dont know how to use that i need to generate barcodes can any body help me how to use those fonts these are font3of9 .i need a small code to use these fonts to generate barcode thank u!

1966