2013-05-08 7 views
0

Image Control에서 SQL Server로 이미지를 저장하는 방법은 무엇입니까? 그 이미지를 업로드하지는 않지만 웹캠을 통해 캡처하여 이미지 컨트롤에 표시하고 있습니다.SQL 서버에 이미지 저장 - ASP.NET

FileStream fs = new FileStream(fileName, FileMode.Open, FileAccess.Read); 

BinaryReader br = new BinaryReader(fs); 

byte[] image = br.ReadBytes((int)fs.Length); 

을 그리고, 데이터베이스에 바이트를 보내

+0

http://stackoverflow.com/questions/15659835/how-to-store-image-in-sql-server-database-tables-column 확인 – Anuj

답변

0

하면 이미지 자체가 아닌 경로를 저장해야 가정하면, 당신은 할 수 있습니다.