|
-
July 18th, 2010, 01:39 PM
#1
javadb problem pls help
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().getCurrentSessio n();
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.I have tried to insert differet colum other that date to quary then the code will work.Please help me on this guys
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|