如何从/到SQL Server BLOB字段数据流? [英] How to Stream data from/to SQL Server BLOB fields?

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

问题描述

有关背景这个问题,   看的 <一个href="http://stackoverflow.com/questions/2101149/how-to-i-serialize-a-large-graph-of-net-object-into-a-sql-server-blob-without">How以序列化的大   图.NET对象到SQL Server   BLOB不会产生大的   缓冲? 的,现在有一个大的   赏金就可以了。

For the background to this question, see "How to I serialize a large graph of .NET object into a SQL Server BLOB without creating a large buffer?" that now has a large bounty on it.

我希望能够使用对象来读/写数据到/从在SQL Server行中的BLOB字段,而不必把所有数据存储到一个临时缓冲区。

I wish to be able to use a Stream object to read/write data to/from a BLOB field in a SQL Server row without having to put the all the data into a temp buffer.

如果上面可以做到......

If the above can be done...

由于流类有很多的CanXXX()的方法,不能够被所有方法都流走接受流输入/输出。

As the Streams class has lot of CanXXX() methods, not all streams can be used by all methods take accept stream inputs/outputs.

那么,如何能够不流必须与 ADO.NET 将数据发送到工作/从SQL Server的?

So how capable does a stream have to be to work with ADO.NET when sending data to/from SQL Server?

我期待有一个标准的流,我可以将它传递给其他的API。

I am looking to have a standard Stream to which I can pass it on to other APIs.

另外两个答案为止只覆盖中获取数据形式的SQLSERVER,不是发送的数据SqlServer的。

Also the two answers so far only covers getting data form SqlServer, not sending the data to SqlServer.

推荐答案

看<一href="http://stackoverflow.com/questions/2101149/how-to-i-serialize-a-large-graph-of-net-object-into-a-sql-server-blob-without">How以序列化不会产生大的缓冲 .NET对象到SQL Server BLOB大图?

see How to I serialize a large graph of .NET object into a SQL Server BLOB without creating a large buffer?

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

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