Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.
以给定缓冲区偏移为起点,将字节流作为数组从指定的列偏移读入到缓冲区中。
Public Overrides Function GetBytes( ByVal ordinal As Integer, ByVal dataIndex As Long, ByVal buffer As Byte(), ByVal bufferIndex As Integer, ByVal length As Integer ) As Long
public override long GetBytes( int ordinal, long dataIndex, byte[] buffer, int bufferIndex, int length )
ordinal 表示获取值的来源列的顺序号。编号从零开始。
dataIndex 从中读取字节的列值内的索引。
buffer 存储数据的数组。
bufferIndex 数组中作为数据复制起点的索引。
length 要复制到指定缓冲区中的最大长度。
读取的字节数。
GetBytes 返回字段中的可用字节数。在大多数情况下,这是字段的实际长度。然而,如果 GetBytes 已经用于从字段中获取字节,则返回的数字可能比字段的实际长度小。例如,当 SADataReader 将一个较大的数据结构读入缓冲区时,就可能出现这种情况。
如果传递的缓冲区是空值引用(在 Visual Basic 中是 Nothing),GetBytes 会以字节为单位返回该字段的长度。
不会进行任何转换,因此检索的数据必须已经是字节数组。