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
shiju kv
NA
91
16.3k
storing image to database
Feb 12 2015 6:58 AM
i would like to store one image to databse. while inserting it shows an exception like
"Object reference not set to an instance of an object" in
"pictureBox2.Image.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg)" this line
here is my code to insert
MemoryStream ms = new MemoryStream();
pictureBox2.Image.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg);
byte[] photo_aray = new byte[ms.Length];
ms.Position = 0;
ms.Read(photo_aray, 0, photo_aray.Length);
please help to find a solution
thanks
Reply
Answers (
1
)
datagridview
Filter a data from the dataset