Hi Guys,
Can we use following sample code to insert a row using Oracle Insert statement
return getHibernateTemplate().executeFind(new HibernateCallback() {
public Object doInHibernate(Session session)
throws HibernateException {
SQLQuery tempQuery = session.createSQLQuery(“Insert into COMPANY(COMPANY_NAME, COMPANY_ID) values (“NortelNetworks”, “NT”);
Let me know.
Also how I can retrieve Primary key “NT” when it catches exception in exception clause.
Exception is due to Unique Constraint Violation.
Any response would be appreciated.
Thanks,
Sreedhar.
Thanks,
Sreedhar.