Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

( IBatis ) After inserting values into database ibatis is returning null

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have this code in my Enquiry.xml file

can anyone help me on how to get a value or a confirmation after successfully inserting data into DataBase...
 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey,
Use <selectKey> ibatis tag ,Then you will achieve what you are expecting.
Its child tag of <insert>.

Cheers,
Dhananjay
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have a question
i am using ibatis insert with JTA trasaction.
My insert is not getting committed though i am using startTransaction commitTrasaction and endTrasaction(in finally block)

Also got to know that ibatis insert returns null.
If ibatis insert returns some value, will it commit the trasaction?

I have been using same code on stand alone java program using JDBC type driver and it is commiting.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!