public int IsStore()throws Exception { session=sessionFactory.openSession(); Transaction tx=session.beginTransaction(); Query query=session.getNamedQuery("com.hiber.dbbean.TblEmpLogin.sp_emp"); query.setParameter(0,enam); query.setParameter(1,epass); System.out.println("The Value of 1st is**********"+ enam); System.out.println("The Value of 1st is*********"+ epass); j=query.list().size(); System.out.println("UPdated Successfully0"+query.list().size()); query.executeUpdate(); tx.commit(); session.close(); System.out.println("UPdated Successfully"); i=1; return i; } }
|