从数据库下载图像并保存在一个文件夹中 [英] download image from database and save in one folder

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

问题描述

我在数据库中将图像保存为Datatype :: Image ...我需要下载该图像并将其保存在一个文件夹中.

I Saved my Image in Database as Datatype::Image...I needed to download that image and save in one folder

推荐答案

dim con as sqlconnection = new sqlcon("put your connection string here")
dim com as sqlcommand=new sqlcommand("select image from tablename where id='1'")
dim image as image
con.open
image=image.frommemorystream(io.new memorystream(ctype(com.executescalar,byte())))
con.close
image.save("c:\)


查看此
从SQL Server数据库中保存和检索文件使用ASP.Net


这篇关于从数据库下载图像并保存在一个文件夹中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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