Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Want to save object using HSQLDB

 
Priya Joshi
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all..

I want to save object of a class in database table..
i have written following code

BlogInfo bInfo = new BlogInfo();
bInfo.setBlogtitle(blogtitle);
bInfo.setBlogurl(blogurl);
bInfo.setUserInfo(uInfo);
bInfo.setDateofcreation(new Date(System.currentTimeMillis()));
bInfo.setCreatedttm(new Timestamp(System.currentTimeMillis()));
bInfo.setUpdatedttm(new Timestamp(System.currentTimeMillis()));
session.saveOrUpdate(session);

but it's not working..

can anyone please tell me how to store object in databse..i am using MYSQL..

please its urgent...

Thanks in advance
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
but it's not working.

This is not an adequate description of a problem. What exactly is happening? Are there any error messages? Does this happen inside of a transaction?

Also, are you using HSQLDB or MySQL?
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Honestly, this question is not related to JSF.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic