我们如何从sqlserver下载数据? [英] how can we download data from sqlserver?

查看:140
本文介绍了我们如何从sqlserver下载数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我的sqlserver中有二进制数据,我想从sql server中下载二进制数据(image,.doc,.pdf,.. etc等).我需要使用哪个控件来下载数据?请帮我提供示例代码..


谢谢.

解决方案

您可以在数据库中保留内容类型(图像/png,文本/纯文本,然后可以在ashx中使用通用处理程序(.ashx)您可以查询您的数据库文件,使用二进制字段,并在设置conetnt-type后需要将其写入ResponseStream.

希望此链接对您有所帮助:
http://satindersinght.blogspot.in/2012/03/save-and- retrive-binarydata-from.html [ ^ ]

让我知道是否有问题.


您可以将它们导出到excel文件中. ->任务->导出数据,并将其导出到所需的数据位置.


Hi to All,
I have binary data in my sqlserver i want to download binary data(image,.doc,.pdf,..etc) from sql server.which control i need to use for downloading data? please help me with sample code..


Thanking you.

解决方案

You can keep content-type (image/png, text/plain in database and then you can use generic handler (.ashx) then in ashx file you can query you database take the binary field and after setting conetnt-type you need to write that to ResponseStream.

Hope this link will help:
http://satindersinght.blogspot.in/2012/03/save-and-retrive-binarydata-from.html[^]

Let me know if you have questions.


You can export them to excel file.


You can use the data export wizard by right clicking database name -> Tasks -> export data and can export them to your desired data location.


这篇关于我们如何从sqlserver下载数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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