How to get sequence of records, from Oracle cursor

27 views
Skip to first unread message

Dan Campbell

unread,
Dec 1, 2015, 1:29:45 PM12/1/15
to Korma
(defn myquery
  [s_id]
    (let 
      [ seq_map_cursor ( exec-raw [ "SELECT  package.function( ? ) key FROM DUAL" [ s_id ] ] :results )
        map_cursor ( into {} seq_map_cursor )
        cursor_rows ( map_cursor :key )
        seq_rows ( resultset-seq cursor_rows )]
        seq_rows ))


Using code similar to the above, the connection keeps getting closed, when I try to convert it to a sequence of rows.  The error is

SQLRecoverableException Closed Statement: getMetaData  oracle.jdbc.driver.OracleResultSetImpl.getMetaData (OracleResultSetImpl.java:168)

, and is happening at the statement 


seq_rows ( resultset-seq cursor_rows )







Reply all
Reply to author
Forward
0 new messages