This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes Error while pulling data from db2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Error while pulling data from db2" Watch "Error while pulling data from db2" New topic
Author

Error while pulling data from db2

rudreshashok kumar
Greenhorn

Joined: Aug 27, 2006
Posts: 16
HI All,

I am getting the following error while pulling data from db2

Error Trace in closeConnection() :java.sql.Connection.close() requested while a transaction is in progress on the connection.The transaction remains active, and the connection cannot be closed.

But the data is pulled successfully,

Can any one help me in finding solution for the above error

Thanks
Rudresh
Scott Johnson
Ranch Hand

Joined: Aug 24, 2005
Posts: 518
Either call Connection.setAutoCommit(true) [usually done when you open the connection] to automatically commit the transaction or explicitly call commit() or rollback() just before close().
[ December 21, 2006: Message edited by: Scott Johnson ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error while pulling data from db2
 
It's not a secret anymore!