Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#
hi Expert!!
 
i create windows application, in this i use 1 table for store company information and also wants to store Company Logo.
 
i fill table using SP, so in form side i pass parameter array and then i pass to the SP.
 
i use properties to set value of properties, but in return time which data type is use for c# form side. because its not support image data type.
 

 
THX....!!!
Posted 15-Sep-12 0:38am
Comments
Lakshmimsridhar at 15-Sep-12 6:42am
   
hi, are you saving image path or image itself?
tarun0702 at 15-Sep-12 6:50am
   
image itself.
tarun0702 at 15-Sep-12 6:50am
   
path is quit easy to store as a string.:)
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

For binary image you should use byte data type or any object type.
Only thing you need to is conversion from binary to byte array & from byte array to binary. Refer this:
C# Image to Byte Array and Byte Array to Image Converter Class[^]
 
--Amit
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Have a look at following links:
Store or Save images in SQL Server[^]
Storing and Retrieving Images from SQL Server Using Strored Procedures and C#.net[^]
Storing and Retrieving Images from SQL Server using Microsoft .NET[^]
 
It is not advisable to store images in the database, rather try storing them into a folder and retrieve them in your application. Store the image path in the database as a varchar instead of using BLOB or any other datatype.
  Permalink  

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

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 Sergey Alexandrovich Kryukov 397
1 OriginalGriff 380
2 Shai Vashdi 280
3 Emre Ataseven 135
4 Abhinav S 128
0 Sergey Alexandrovich Kryukov 8,894
1 OriginalGriff 5,200
2 Peter Leow 3,955
3 Maciej Los 3,535
4 Abhinav S 3,208


Advertise | Privacy | Mobile
Web01 | 2.8.140415.2 | Last Updated 15 Sep 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Use
Layout: fixed | fluid