Back Forum Reply New

what happens to the db connections after this call?

I am passing the dbucl value dynamically based on user's selection in my case.Code:
dbucl=quot;jdbcracle:thin${dbucl}quot;       log.info quot;$dbuclquot;       def sql = Sql.newInstance(quot;${dbucl}quot;,        quot;testquot;, quot;testquot;, quot;oracle.jdbc.OracleDriverquot;)       def selectEmpStatement=quot;quot;quot;        select * from emp      quot;quot;quot;             List empListTemp= new ArrayList()       sql?.eachRow(selectEmpStatement){empListTemp.add(it.empno)       }
what happens to the connection it created for fetching the data. Will it be taken care by the GORM or I have to close the connection?

Thanks

As described here, you will have to manually close the connection via sql.close(). You are basically bypassing GORM.
¥
Back Forum Reply New