• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Sybase issue

 
Ranch Hand
Posts: 159
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am having Sybase as my backend.
When I am inserting to table with a image column which basically stores a large string and the string to be inserted is of length 0,then it thron this exception,
java.sql.SQLException: JZ0C0: Connection is already closed.
at com.sybase.jdbc2.jdbc.ErrorMessage.raiseError(ErrorMessage.java:498)
at com.sybase.jdbc2.jdbc.SybConnection.checkConnection(SybConnection.jav
a:1619)
at com.sybase.jdbc2.jdbc.SybStatement.checkDead(SybStatement.java:1717)
at com.sybase.jdbc2.jdbc.SybPreparedStatement.setString(SybPreparedState
ment.java:249)
I run my code on Oracle and MS SQL and it works fine in similar conditions.
But for Sybase only I get this exception.
So I dont think there is connection being closed by my code anywhere.
The Sybase help at this link
http://sybooks.sybase.com/onlinebooks/group-jcarc/jcg0500e/jc_ref/@Generic__BookTextView/8757
Gives
Description: The application has already called Connection.close() on this connection object; it cannot be used any more.
Action: Fix the code so that connection object references are nulled out whenever a connection is closed.
Has anybody else faced such a problem and what was done to ensure nothing of this sort happened.
Thanks,
Chinmay
 
When I was younger I felt like a man trapped inside a woman’s body. Then I was born. My twin is a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic