如何使用C#保存图像数据库 [英] How to save image in database using C#

查看:121
本文介绍了如何使用C#保存图像数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要保存用户的图像成为在C#中的数据库。我该怎么办呢?

I want to save user image into a database in C#. How do I do that?

推荐答案

您需要将图像序列化到可以存储在SQL BLOB列中的二进制格式。假设你使用SQL Server,以下是关于这个问题的好文章:

You'll need to serialize the image to a binary format that can be stored in a SQL BLOB column. Assuming you're using SQL Server, here is a good article on the subject:

http://www.eggheadcafe.com/articles/20020929.asp

这篇关于如何使用C#保存图像数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆