Click here to Skip to main content
15,899,124 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi, I want to insert image in databse using Asp.net,sql,c#. And I also want to display image in GridView. Please help me..
Posted
Comments
[no name] 29-Jun-12 11:56am    
Is the search function broken? This exact question is asked over and over. Asking without doing the least little bit of research just wastes our time and your time.
ZurdoDev 29-Jun-12 11:58am    
It requires a lot of code to do this. Please get started and then let us know where you get stuck.

It's not at all difficult to do, but I wouldn't recommend it. Store a thumbnail in a DB, yes, but the image itself should be stored outside, and the location of that file recorded in the DB. The logic is simple: Images get big very quickly, and space in a DB is limited (how limited depends on the DB, and the version of the DB). It also uses significant bandwidth to access images direct from a DB, and this can cause problems for all user of the database server.

To store an image or a thumbnail is the same as storing any other binary item: just add the data as a parameter to a INSERT of UPDATE query, and execute it as normal.
 
Share this answer
 
hi,
Please follow the link below to find your solution:
Save An Image Into SQL Server 2000 Database[^]
Storing and Retrieving Images from SQL Server Using Strored Procedures and C#.net[^]

All the best.
--Amit
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900