Ora8LobWrite2 Function

Action

Writes data into a LOB. The data to be written is read from the specified file.

Include file

Ora8.bdh

Syntax

Ora8LobWrite2( in  hSvcCtx       : number,
               in  hLobLoc       : number,
               in  nSizeOfPieces : number,
               in  sFile         : string,
               out nCntWritten   : number optional ): boolean;

Return value

  • true if successful

  • false otherwise

Parameter Description
hSvcCtx The service context handle.
hLobLoc An internal LOB locator that references the LOB.
nSizeOfPieces Size of pieces to write.
sFile Name of the file containing the data.
nCntWritten Count written (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");

    ...

    Ora8LobWrite2(ghSvcCtx0, ghDescriptor0, 5278, "Descriptor_103292907.dat");

    ...

    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: OCILobWrite