Ora8LobRead Function

Action

Reads a portion of a LOB/FILE, as specified by the call.

Include file

Ora8.bdh

Syntax

Ora8LobRead( in  hSvcCtx       : number,
             in  hLobLoc       : number,
             in  nSizeOfPieces : number,
             in  nSizeToRead   : number,
             in  nStartOffset  : number,
             in  nCharsetID    : number optional,
             in  nCharsetForm  : number optional,
             out nCntRead      : number optional ) : boolean;

Return value

  • true if successful

  • false otherwise.

Parameter Description
hSvcCtx The service context handle.
hLobLoc A LOB/FILE locator that references the LOB/FILE.
nSizeOfPieces Size of pieces to read.
nSizeToRead Cumulated size to read.
nStartOffset Start offset for first piece.
nCharsetID Charset ID (optional).
nCharsetForm Charset form (optional).
nCntRead Count read (optional).

Example

var
  ghEnv0        : number;
  ghError0      : number;
  ghStmt0       : number;
  ghSvcCtx0     : number;
  ghDescriptor0 : number;

dcltrans
  transaction TMain
  begin
    Ora8Init(ghEnv0, OCI_DEFAULT);
    Ora8HandleAlloc(ghEnv0, ghError0, OCI_HTYPE_ERROR);
    Ora8Logon(ghEnv0, ghSvcCtx0, "user", "password", "orclnet2");

    ...
          
    Ora8LobRead(ghSvcCtx0, ghDescriptor0, 500, 30000, 0);

    ...

    Ora8Logoff(ghSvcCtx0);
    Ora8HandleFree(ghError0, OCI_HTYPE_ERROR);
    Ora8HandleFree(ghEnv0, OCI_HTYPE_ENV);
  end TMain;

See also

Oracle's Programmer's Guide to Oracle Call Interface for Wrapped Oracle functions: OCILobRead