TOOL_RES.Rfread
Description
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 |
The type of resource. |
restype |
A file to read. |
Returns
A handle to the specified file.
Usage Notes
The following exceptions may be raised by Rfread:
Exception |
Description |
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;