Mimer SQL Data Provider help
GetBytes Method




Mimer.Data.Client Namespace > MimerDataReader Class : GetBytes Method
The zero-based column ordinal position.
The offset within the field from which to begin the read operation.
The buffer into which to read the stream of bytes.
The offset for buffer to begin the read operation.
The maximum length to copy into the buffer.
Reads a stream of bytes from the specified column offset into the buffer starting at the given buffer offset.
Syntax
'Declaration
 
Public Overrides NotOverridable Function GetBytes( _
   ByVal i As Integer, _
   ByVal fieldOffset As Long, _
   ByVal buffer() As Byte, _
   ByVal bufferOffset As Integer, _
   ByVal length As Integer _
) As Long
public override long GetBytes( 
   int i,
   long fieldOffset,
   byte[] buffer,
   int bufferOffset,
   int length
)
public function GetBytes( 
    i: Integer;
    fieldOffset: Int64;
    buffer: Bytearray of;
    bufferOffset: Integer;
    length: Integer
): Int64; override; 
public override function GetBytes( 
   i : int,
   fieldOffset : long,
   buffer : byte[],
   bufferOffset : int,
   length : int
) : long;
public: long GetBytes( 
   int i,
   long fieldOffset,
   byte[]* buffer,
   int bufferOffset,
   int length
) override 

Parameters

i
The zero-based column ordinal position.
fieldOffset
The offset within the field from which to begin the read operation.
buffer
The buffer into which to read the stream of bytes.
bufferOffset
The offset for buffer to begin the read operation.
length
The maximum length to copy into the buffer.

Return Value

The actual number of bytes read.
Exceptions
ExceptionDescription
The underlying SQL data type cannot be converted to a byte array.
The MimerDataReader is not positioned on a row.
Remarks
If buffer is null, GetBytes returns the length of the field.

Supported SQL data types for the conversion are: BINARY, VARBINARY, and BLOB.

Use the IsDBNull method to check for database null value before calling this method.

Requirements

.NET Framework
Version 2.0 or later

See Also

Reference

MimerDataReader Class
MimerDataReader Members