java - mysql loading previous query data to present queries also -


public class sample {      public static void main(string[] args) {         connection con;         try {             class.forname("com.mysql.jdbc.driver");             con = drivermanager.getconnection(                     "jdbc:mysql://localhost/cluster", "root",                     "password");             preparedstatement pst = con                     .preparestatement("insert employee_details (employee_id,name,salary,department,manager)values(?,?,?,?,?)");             pst.clearparameters();             pst.setobject(1, 101);             pst.setobject(2, "sam");             pst.setobject(3, 1000000);             pst.setobject(4, "it");             pst.setobject(5, "jord");             pst.execute();             system.out.println("values got updted-----");         } catch (classnotfoundexception e) {             e.printstacktrace();         } catch (sqlexception e) {             e.printstacktrace();         }      } } 

for first time query working fine , data getting loaded mysql data base.but when execute same programme after changing values database loading loaded values again , again.. why happening..

got it,the problem eclipse itself.after making changes eclipse not saving new copy automatically , when try compile compiling old copy without new changes.if manually save code after changes working fine...


Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -