Hi,
if I put verbose logging on I see the following messages for every sql call to the database :
org.springframework.jdbc.object.SqlFunction - SQL operation not compiled before execution - invoking compile
org.springframework.jdbc.support.SQLErrorCodesFact ory - Looking up default SQLErrorCodes for DataSource
Can someone explain me what this means ? Can I avoid the compilation of the sql every time ? And why does it need to lookup errorcodes while I am using only one type of database ?
Thanks,
Henk
Here is a piece of code :
Code:public boolean rowExists(Timestamp tstamp, SynopDataBean bean) { String sqlString = "SELECT COUNT(station_code) FROM SYNOPDATA WHERE timestamp=? AND station_code=?"; SqlFunction checkNr = new SqlFunction(ds,sqlString); Object[] params = new Object [] {tstamp, bean.getStationCode()}; checkNr.setTypes(new int[] { Types.TIMESTAMP, Types.NUMERIC}); if (checkNr.run(params) > 0) { return true; } else { return false; } }


Reply With Quote