closing cursor in dbms_xmlgen.getXML

DECLARE
l_clob   CLOB;
ctx      DBMS_XMLGEN.CTXHANDLE;
BEGIN
ctx   := DBMS_XMLGEN.NEWCONTEXT (‘select 1 id,cursor(select 1 subid from dual) subid from dual’); –Assign the query as a new context
DBMS_XMLGEN.GETXML ( ctx, l_clob);
–do your processing on l_clob
DBMS_XMLGEN.CLOSECONTEXT (ctx);  –close the context to release all open cursors or any other resources.
END;

Regards

Mohammad Talat

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s