SqlDataReader.Read - 是否有大小限制? [英] SqlDataReader.Read - is there a size limit?

查看:141
本文介绍了SqlDataReader.Read - 是否有大小限制?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好

我有一个在SQL Server 2005中运行的存储过程,它生成XML。这是通过使用SQL Server 2005的FOR XML功能实现的。

I have a stored procedure running in SQL Server 2005 which generates XML. This is achieved by using the FOR XML feature of SQL Server 2005.

重新排列的XML将会很大 - 在5MB的范围内。我的测试数据目前返回200Kb,相比较小,但我仍然遇到问题。

The resutant XML is going to be large - in the region of 5MB. My test data is currently returning 200Kb which is small in comparison, however I am still experiencing a problem.

我在Visual Studio 2005中有一个用VB.Net编写的项目。我正在使用DataAccess的ExecuteReader来运行存储过程。然后我执行一个SqlDataReader.Read()来访问数据。

I have a project in Visual Studio 2005, written in VB.Net. I'm using DataAccess' ExecuteReader to run the stored procedure. I am then performing a SqlDataReader.Read() to access the data.

这只给我2Kb左右数据 - 准确地说是前2034个字节,其余的以某种方式不被传递。

This is only giving me around 2Kb of data - the first 2034 bytes to be precise, and the rest is somehow not being passed.

任何人都可以提供有关为什么会这样做以及可能的解决方法的任何见解吗?

Can anyone offer any insight into why this might be and possible workarounds?

非常感谢

Rich

推荐答案

问题解决了。

事实证明,SqlDataReader.Read()只获取了一定数量的字符。不确定这是否是内置限制,或者我的数据中是否存在导致此问题的内容。

It turns out that SqlDataReader.Read() was only fetching a certain number of characters. Not sure if this is an in-built limit, or if there is something in my data to cause this.

这是我的代码:




代码段


这篇关于SqlDataReader.Read - 是否有大小限制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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