Click here to Skip to main content
12,455,917 members (37,929 online)
Rate this:
 
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
Top Experts
Last 24hrsThis month


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

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100