想要从数据库中保存和检索图像 [英] Want to save and retrieve image from database

查看:81
本文介绍了想要从数据库中保存和检索图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

谁能帮我,将图像保存到数据库中以及从数据库中检索该图像.我需要执行此操作的查询.

Hello,

Can anyone help me, for saving a image into database and for retrieving that image from database. I need the query for doing this.

推荐答案

检查以下链接

C#从数据库中保存和加载图像

http://www.shabdar.org/sql-server/105-store-save-images-in-sql-server.html


http://www.dotnetcurry.com/ShowArticle.aspx?ID=129

http://www.dotnettutorials.com/tutorials/database/save-retrieve-image- cs.aspx

http://www.c -sharpcorner.com/uploadfile/dbeniwal321/从使用C-Sharp到数据库的读取和保存图像/
check following links

C# Save and Load Image from Database

http://www.shabdar.org/sql-server/105-store-save-images-in-sql-server.html


http://www.dotnetcurry.com/ShowArticle.aspx?ID=129

http://www.dotnettutorials.com/tutorials/database/save-retrieve-image-cs.aspx

http://www.c-sharpcorner.com/uploadfile/dbeniwal321/reading-and-saving-images-fromto-a-database-using-C-Sharp/




您可能会看我的文章是否有帮助...
从数据库到Gridview的显示/存储和检索图像数据

祝您编程愉快...
Hi,

You may see my article if could help...
Display/Store and Retrieve Image Data from Database to Gridview

Happy coding...


尝试一下,

在数据库中有一列数据类型为 varbinary 的列,将图像转换为 字节 并将其存储在数据库中.
进行检索的同时,将内容放入字节数组并将其写入具有图像扩展名的文件中,然后就可以使用该图像.
try this,

have a column with a datatype varbinary in the database,convert the image to bytes and store it in the database.
while retriving get the thing in a byte array and write it to a file with image extension then you can use the image.


这篇关于想要从数据库中保存和检索图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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