|Oracle® interMedia Reference
10g Release 1 (10.1)
Part Number B10829-01
closeSource(ctx IN OUT RAW) RETURN INTEGER;
Closes a data source.
The source plug-in context information. This should be allocated and initialized to NULL. If you are using a user-defined source plug-in, you should call the openSource( ) method. See the introduction to this chapter for more information.
The RETURN INTEGER is 0 (zero) for success and greater than 0 (for example, 1) for failure. The exact number and the meaning for that number is plug-in defined. For example, for the file plug-in, 1 might mean "File not found," 2 might mean "No such directory," and so forth.
This exception is raised if you call the closeSource( ) method and the value for the source.srcType attribute is NULL.
This exception is raised if you call the closeSource( ) method and this method is not supported by the source plug-in being used.
This exception is raised if you call the closeSource( ) method and the source plug-in raises an exception.
See Appendix F for more information about these exceptions.
Close an external data source:
DECLARE obj ORDSYS.ORDAudio; res INTEGER; ctx RAW(64) :=NULL; BEGIN SELECT product_audio INTO obj FROM pm.online_media WHERE product_id=1733 FOR UPDATE; res := obj.closeSource(ctx); UPDATE pm.online_media SET product_audio=obj WHERE product_id=1733; COMMIT; EXCEPTION WHEN ORDSYS.ORDSourceExceptions.METHOD_NOT_SUPPORTED THEN DBMS_OUTPUT.PUT_LINE('ORDSourceExceptions.METHOD_NOT_SUPPORTED caught'); WHEN OTHERS THEN DBMS_OUTPUT.PUT_LINE('EXCEPTION caught'); END; /