public static void updatePathTable ( String columnName , Object newData , int path_id ) { PreparedStatement statement = null ; try ( Connection sqlConnection = sqlService . getConnection ( ) ) { statement = sqlConnection . prepareStatement ( "UPDATE " + Constants . DB_TABLE_PATH + " SET " + columnName + " = ?" + " WHERE " + Constants . GENERIC_ID + " = ?" ) ; statement . setObject ( 1 , newData ) ; statement . setInt ( 2 , path_id ) ; statement . executeUpdate ( ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } finally { try { if ( statement != null ) { statement . close ( ) ; } } catch ( Exception e ) { } } }
Updates a path table value for column columnName