开发者

How to store an image into database

开发者 https://www.devze.com 2023-02-11 14:19 出处:网络
How can I use openfiledialog and a picturebox and upload an image and stor开发者_高级运维e it into SQL ServerIf you g0ogled c# store image in sql, the first 2 results would have been

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

0

精彩评论

暂无评论...
验证码 换一张
取 消