AdoNetCore.AseClient icon indicating copy to clipboard operation
AdoNetCore.AseClient copied to clipboard

32k-cutoff of image data while reading from ASE 15.7/16

Open akley opened this issue 3 years ago • 1 comments

I have a strange behavior when reading an image field from DB with your client.

What I have found out: AseDataReader.GetValue delivers a byte array with a lenght of max 32768 bytes. AseDataReader.GetBytes call internaly GetValue and deliver the same 32768 bytes.

But the size of the image in the database is 148655 bytes. I think that the underlying RowResult object holds the wrong amount of bytes in the CurrentRow instance.

It is possible that this could a bug?

Environment

  • .NET Standard 2.0.3
  • AdoNetCore.AseClient nuget package version 0.19.1
  • Sybase ASE 15.7 & 16.0

Best regards Alex

akley avatar Feb 18 '22 14:02 akley

seems like standard sybase behavior. For every query prefix your sql with SET TEXTSIZE X where X is max size you expect from the data. I always use 2000000 which is more or less max size possible

mosheb avatar May 03 '22 12:05 mosheb