GetBytes() for ExecuteReader( CommandBehavior.SequentialAccess ) return special byte

Topics: Data Access Application Block
Mar 13, 2014 at 7:27 PM
Hi,
 Did anyone encountered issue of GetBytes() for ExecuteReader( CommandBehavior.SequentialAccess ) return special byte instead of last byte in requested data chunk ? For example if byte array is 2220 bytes and GetBytes() gets data in chunks of 1000, then for first 2 requests it would have return value equal 1000, but byte array will have 999 bytes and last byte will be set to 0, last call will return 220 bytes without "special" byte.
Mar 14, 2014 at 9:40 AM
I don't think Enterprise Library provides a method to set the CommandBehavior for ExecuteReader so I'm assuming that the CommandBehavior is being set directly on the DbCommand object. If you have a reproducible scenario and the issue is in the .NET Framework (e.g. DbCommand/SqlCommand) then you can log an issue on Microsoft Connect.

~~
Randy Levy
entlib.support@live.com
Enterprise Library support engineer
Support How-to