Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.
从指定的偏移量开始,到目标 System.Byte 数组的指定偏移量为止,复制指定的 ULDbType.LongBinary 列的值的子集。
Public Overrides Function GetBytes( ByVal colID As Integer, ByVal srcOffset As Long, ByVal dst As Byte(), ByVal dstOffset As Integer, ByVal count As Integer ) As Long
public override long GetBytes( int colID, long srcOffset, byte[] dst, int dstOffset, int count )
colID 列的 ID 号。值必须在 [0,ULDataReader.FieldCount-1] 范围内。游标中第一列的 ID 值为 0。
srcOffset 列值的起始位置。该值从零开始。
dst 目标数组。
dstOffset 目标数组的起始位置。
count 要复制的字节数。
实际复制的字节数。
ULException 类 发生 SQL 错误。
如果传递一个为空值引用(在 Visual Basic 中是 Nothing)的 dst 缓冲区,GetBytes 方法会以字节为单位返回该字段的长度。
位于值的 srcOffset 到 srcOffset+count-1 之间的字节将被逐个复制到目标数组的 dstOffset 到 dstOffset +count -1 位置处。如果在复制完 count 个字节之前就到达了值尾,则目标数组的剩余部分保持不变。
如果出现以下任一情况,则抛出代码为 ULSQLCode.SQLE_INVALID_PARAMETER 的 ULException 对象,并且不会修改目标:
srcOffset 为负值。
dstOffset 为负值。
count 为负值。
dstOffset+count 大于 dst 长度。
对于其它错误,抛出具有相应错误代码的 ULException 对象。