Hey Im new to java.I'm doing a project from java.since i'm new to java i have some problem with java db data retriving.Please guys help me
I have date field in my javadb.I have to retrive data from the table via date field.
Date date = jCalendar1.getDate(); session = HibernateUtil.getSessionFactory().getCurrentSession(); session.beginTransaction(); List result = session.createQuery("from Presentation.Appoinment where location=\'"+date+"\'").list(); for(Object a:result){ Appoinment app=(Appoinment)result; JOptionPane.showMessageDialog(this, app.getLocation()); } session.getTransaction().commit(); HibernateUtil.getSessionFactory().close();
but code won't work.Please help me on this guys