The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

vardhan_br (1) [Avatar] Offline
#1
HI, i am using hibernate application first time , so when i am running the application a table creating succesfull in in the sql server , after that when i am trying to insert values in to that table its not taiking. i downloaded this application from net (application contains two java file contact.java & FirstExample.java, 2 xml files contact.hbm.xml, hebernate.cfg.xml,). if any one knows solution for this plz help me.My mail id is vardhan_br@yahoo.co.in
suury7 (1) [Avatar] Offline
#2
Re: Records not inserting into database
Dear Friend,

I also faced the same problem in FirstExample.java.

you just use the following statements in this file.

org.hibernate.Transaction tx = session.beginTransaction();
tx.commit();

Regards,
Suresh.
Sobhen (16) [Avatar] Offline
#3
Re: Records not inserting into database
Add the following line in hibernate.cfg.xml

<property name="show_sql">true</property>
and check the query coming in console.