将图像插入数据库 [英] insert an image into database

查看:106
本文介绍了将图像插入数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用代码
将图像从apage插入mytable到sql数据库中时 因此它存储在数据库中而不是图像中,而是存储在诸如system.web .....
之类的其他内容中 如何将路径转换为图像
感谢

when insert the image into mytable in to sql data base from apage by using the code
so it stor in database not the image but another thing like system.web.....
how converted the path into image
thanks

推荐答案

您的问题尚不完全清楚,但是我建议您不要尝试将图像直接存储到数据库中,而应存储它们的物理/虚拟路径,如果您需要在网页上显示图像时,请从数据库中读取路径,然后从该路径中加载图像.

希望这对您有帮助...
your question is not entirely clear, but I would suggest instead of trying to store images directly to the database, store their physical/virtual path and then if you need to display images on your webpage read the path from the database and load the image from that path.

Hope this helps...


引用此链接

http://www.codeproject.com/KB/database/ImageSaveInDataBase.aspx
refer this link

http://www.codeproject.com/KB/database/ImageSaveInDataBase.aspx


这篇关于将图像插入数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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