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.