传输SQL 2005查询结果 [英] Transfer SQL 2005 Query result

查看:63
本文介绍了传输SQL 2005查询结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



在我的Web应用程序(VS2008)中,我必须将MS SQL 2005中的查询结果从一个MS SQL实例传输到另一个MS SQL实例便携式存储设备(两个服务器都在不同的网络中)。查询结果包括存储在varbinary(max)字段和varchar字段中的图像。



我考虑将查询结果保存在XML文件,Excel甚至Access 2007中。典型的问题是处理varbinary数据。我的研究表明,SQL 2005中的varbinary(max)和Access中的OLE Object之间存在转换问题。



这里最好的方法是什么?如果有人之前已经处理过这个问题,你能否分享经验/代码片段?

Hi All,

In my web application (VS2008), I have to transfer result of a query in MS SQL 2005 from one MS SQL instance to another using a portable memory device (both servers are in different networks). The query results include images stored in varbinary(max) fields and varchar fields.

I looked at saving the query results in XML Files, Excel, and even Access 2007. Typical issue is handling of varbinary data. My research suggest that there is conversion issue between varbinary(max) in SQL 2005 and OLE Object in Access.

What would be the best way here? If any one has worked on this before, can you please share experience/code snippets?

推荐答案

如何将VARBINARY(Max)转换为Base64字符串并保存为其他OLEDB数据库中的字符串?
How about converting the VARBINARY(Max) as a Base64 string and saving as string in other OLEDB databases?


查看此代码示例:



http://blog.falafel.com/Blogs/adam-anderson/2012/10 / 18 / t-sql-easy-base64-encoding-and-decoding [ ^ ]
Check out this code sample:

http://blog.falafel.com/Blogs/adam-anderson/2012/10/18/t-sql-easy-base64-encoding-and-decoding[^]


这篇关于传输SQL 2005查询结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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