A script-enabled browser is required for this page to function properly.

TOOL_RES.RFREAD built-in function

This function reads the specified resource. If a file handle is included, only the specified resource file will be searched for the named resource. Otherwise, all currently open resource files will be searched.

Syntax


FUNCTION Tool_Res.Rfread
(rfile rfhandle,
resid VARCHAR2,
restype VARCHAR2 := 'string')
RETURN VARCHAR2;

FUNCTION Tool_Res.Rfread
(resid VARCHAR2,
restype VARCHAR2 := 'string')
RETURN VARCHAR2;

Parameters

Parameter

Description

rfile

A file to read.

resid

A resource ID.

restype

The type of resource.

Returns

A handle to the specified file.

Usage notes

The following exceptions may be raised by RFREAD:

NO_RESOURCE

Raised if the named resource could not be located.

BUFFER_OVERFLOW

Raised if the supplied "buffer" is smaller than the requested resource.

TOOL_ERR.TOOL_ERROR

Raised if an internal error is trapped.

Example


 /* 
  ** This examples uses TOOL_RES.RFREAD
  */
  PRODEDURE ban_res IS
  resfileh TOOL_RES.RFHANDLE;
  res1 VARCHAR2(20);
   BEGIN
    /* Open a resource file */ 
     resfileh := TOOL_RES.RFOPEN
     ('C:\resource\test.res');
    /* Read resource string 'banner' from file */
     res1 := TOOL_RES.RFREAD(resfileh,'banner');
     ...
      TEXT_IO.PUT_LINE(res1);
     ...

  END;

See also

About the TOOL_RES built-in package

TOOL_RES built-in package