Main change: Added a method for JDBC driver to be able to close an open cursor abruptly by passing in a 0 length to the extract syntax. This will ensure internal opens are not left around if the application does not retrieve all the data with the stream API. This abrupt close can be called when the result set is closed or the connection is closed by keeping track of all the open Blob objects. (in the driver) Added a freeResources method and destructor to LobExtract and LobUpdate Tcbs. Minor changes and fixes : Refactored the ExLob::closeCursor Removed the LOB_CLI_SELECT_CLOSE call from ::fetchCursor so it gets closed only when ExLob::closeCursor is called. Makes the code consistent and readable. Took care of a few memory allocations and deletions. Refactored the LOB length calculation into on ecommon method so it works correctly for both regular LOB dat aas well as external LOB files. Earlier the external lobs length was being returned incorrectly. Now it reports the length of the external HDFS file . Fixed one place in generator where the CQD value was not being multiplied by the MB units correctly.