从数据库下载图像并保存在一个文件夹中

问题描述:

我在数据库中将图像保存为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