dotConnect for DB2 Documentation
Devart.Data.DB2.DB2Types Namespace / DB2Blob Structure / GetBytes Method
The specified column offset.
The specified buffer to read data to.
The specified buffer offset.
The number of bytes to read.

In This Topic
    GetBytes Method (DB2Blob)
    In This Topic
    Reads the specified number of bytes starting from the specified column offset into the buffer starting at the specified buffer offset.
    Syntax
    'Declaration
     
    Public Function GetBytes( _
       ByVal dataIndex As Long, _
       ByVal buffer() As Byte, _
       ByVal bufferIndex As Integer, _
       ByVal length As Integer _
    ) As Long
    public long GetBytes( 
       long dataIndex,
       byte[] buffer,
       int bufferIndex,
       int length
    )

    Parameters

    dataIndex
    The specified column offset.
    buffer
    The specified buffer to read data to.
    bufferIndex
    The specified buffer offset.
    length
    The number of bytes to read.

    Return Value

    The actual number of bytes read.
    Remarks

    If the buffer parameter is null, GetBytes returns the length of the field in bytes.

    If the CacheData property is false, applications can only retrieve the complete set of data from a DB2Blob instance once (by any of the ways): via the GetBytes method, Value property, or the ToString method. Tying to retrieve the current instance data again by any of the means results in System.InvalidOperationException.

    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also