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 Maciej Los 404
1 OriginalGriff 369
2 Sergey Alexandrovich Kryukov 158
3 CPallini 145
4 Hard_Rockz 85
0 OriginalGriff 5,634
1 Sergey Alexandrovich Kryukov 4,763
2 Peter Leow 2,954
3 Maciej Los 2,614
4 DamithSL 2,465


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