Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: WinXP SQL-server-2005 VS2005 , +
I have created a form in which there are various values such as Name, Address, Date of Birth etc. The user is also allowed to select an image in a picture box.
I want to insert these values along with the Image into database in appropriate columns.
Any help is appreciated
Posted 5-Apr-10 10:00am
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Serialize the image as a byte array (up to you how you want to do that). Then insert it into a column of type varbinary(max) or image. Those data type names are a bit misleading.... the data type "image" actually means byte array (as does varbinary). When you get the image from the database, you'll need to deserialize it to use it as an image again.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

You can store images into database by converting image into bytes and storing these bytes in column
 
read this article for reference
  Permalink  

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

  Print Answers RSS
0 CHill60 360
1 OriginalGriff 343
2 Sarvesh Kumar Gupta 168
3 RyanDev 145
4 Sergey Alexandrovich Kryukov 128


Advertise | Privacy | Mobile
Web04 | 2.8.140709.1 | Last Updated 6 Apr 2010
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid