Answered by:
How to add image in ms access 2010 database using vb .net 2010

Question
-
User-1002982832 posted
im working on my project that can produce printable worksheets.
i want to be able to add images/videos to a database.
PROCEDURE.
ive created a ms access database named images_DB with images as a field name
while in vb .net i create 1 textbox where the URL (specific directory of the image i want to add) will appear
a button named 'Browse' for browsing the image i want to add. and another button named 'Save' for saving the
picture to the database
Hope someone can help me with the code
Thanks
Jan
Sunday, December 4, 2011 9:55 AM
Answers
-
-
User3866881 posted
Hello jomarr:)
Simply speaking,you should:
1)First you should put a fileuploader first。
2)Then you should use System.IO.ReadAllBytes to read the posted file into binaryformation。
3)In the end,you should use SqlCommand to update it。
Sample is just what hans_v's has suggested。
Best reguards!
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Monday, December 5, 2011 8:30 PM
All replies
-
-
User3866881 posted
Hello jomarr:)
Simply speaking,you should:
1)First you should put a fileuploader first。
2)Then you should use System.IO.ReadAllBytes to read the posted file into binaryformation。
3)In the end,you should use SqlCommand to update it。
Sample is just what hans_v's has suggested。
Best reguards!
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Monday, December 5, 2011 8:30 PM