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