DB2Clob.Read(char[] buff, Int64 charOffset, Int64 numCharsToRead, Int64 smartLobOffset, DB2SmartLOBWhence whence) method

Reads characters from the CLOB object that are represented by the DB2Clob instance.

Namespace:
IBM.Data.DB2Types
Assembly:
IBM.Data.DB2 (in IBM.Data.DB2.dll)

Syntax


[Visual Basic]
Public Function Read( _
   ByVal buff() As Char() _,
   ByVal charOffset As Long,
   ByVal numCharsToRead As Long,
   ByVal smartLobOffset As Long,
   ByVal whence As DB2SmartLOBWhence
) As Int64
[C#]
public Int64 Read(
   char[] buff,
   Int64 charOffset,
   Int64 numCharsToRead,
   Int64 smartLobOffset,
   DB2SmartLOBWhence whence
);
[C++]
public: __int64 Read(
   char[] buff,
   __int64 charOffset,
   __int64 numCharsToRead,
   __int64 smartLobOffset,
   DB2SmartLOBWhence whence
);
[JScript]
public function Read(
   buff : char[],
   charOffset : Int64,
   numCharsToRead : Int64,
   smartLobOffset : Int64,
   whence : DB2SmartLOBWhence
) : Int64;

Parameters

buff
The buffer into which to copy data.
charOffset
The character offset value of the buffer that indicates the start position in buffer to which CLOB data is written.
numCharsToRead
The number of characters to read from this CLOB object.
smartLobOffset
The character offset value of the CLOB object from which to start reading the CLOB data.
whence
The starting position, from which smartLobOffset is counted, defined by the DB2SmartLOBWhence enumeration. For more information about the DB2SmartLOBWhence enumeration, see remarks section.

Return value

The actual number of characters that are read.

Remarks

The CLOB object is read into the buff character array starting at the element that is specified by the charOffset parameter. Only characters that are specified by the numCharsToRead parameter are read. Before the data is read, the cursor is positioned according to the value of whence parameter.

An error is returned if the DB2®Clob.Read(char[] buff, Int64 charOffset, Int64 numCharsToRead, Int64 smartLobOffset, DB2SmartLOBWhence whence) method writes outside the bounds of the buff character array.

The DB2SmartLOBWhence enumeration specifies the meaning of an offset value.
public enum DB2SmartLOBWhence
   {
      Begin       =   0,
      Current     =   1,
      End         =   2
   }