J
John Grandy
Does SqlReader.GetBytes() reliably always return the total number of bytes
in a varbinary column ?
// establish sqlReader
using ( sqlReader )
{
int ordinal = sqlReader.GetOrdinal("VarBinaryColumn");
byte[] data = null;
if ( !sqlReader.IsDBNull(ordinal ) )
{
long length = sqlReader.GetBytes(ordinal, 0, null, 0, 0);
// ... etc.
}
}
in a varbinary column ?
// establish sqlReader
using ( sqlReader )
{
int ordinal = sqlReader.GetOrdinal("VarBinaryColumn");
byte[] data = null;
if ( !sqlReader.IsDBNull(ordinal ) )
{
long length = sqlReader.GetBytes(ordinal, 0, null, 0, 0);
// ... etc.
}
}