TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Prafulla Choudhary
NA
89
85.7k
How to store image in Sql Server Database using C# ?
Jul 5 2013 2:22 AM
Dear All
I am try to convert image in byte then insert it into Database using C#.Below is my code .........
public byte[] getImageData(string strFleNm)
{
byte[] ImgData = null;
FileInfo fileinfo = new FileInfo(strFleNm);
long imagefilelenght = strFleNm.Length;
FileStream Fs = new FileStream(strFleNm, FileMode.Open, FileAccess.Read);
BinaryReader Br = new BinaryReader(Fs);
ImgData = Br.ReadBytes((int)imagefilelenght);
return ImgData;
}
but its give error,Error is like Could not find image .....................
Reply
Answers (
5
)
How to use Ajax Calender Extender Control?
Runtime Error