How can I use openfiledialog and a picturebox and upload an image and stor开发者_高级运维e it into SQL Server
If you g0ogled c# store image in sql
, the first 2 results would have been
Store or save images in SQL Server database using C#
Store or Save images in SQL Server
You need to keep field datatype as varbinary(Max) in the database table. then convert image into byte array. then pass this byte array as parameter respect to your varbinary field. it will be saved in your database. while retrieving, get value from database as byte array the convert it into Image object. hope this sequence helps you. or more code example you can find here
精彩评论