• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1243
  • Last Modified:

Sybase Image column gets truncated to 16K

We have  two environments Test and Development. Both running on same version of Sybase server  --Adaptive Server Enterprise/12.5.1/EBF 11559 ESD#1/P/Sun_svr4/OS 5.8/ase1251/1831/32-bit/FBO/Sat Nov 2--

We have a Table with one of the column defined as Image. We are storing pdf documents in that column. But for some reason , the pdf documents gets truncated to 16k in our Test environment whereas the same works on  Development.

Our project is a typical j2EE project. so we use hibernate from the java layer to handle all database operations. We are using jconn2.jar as the database driver.

Listes below are our findings.

1)  IF we use a different driver jar file , like the one that comes along with weblogic for Sybase, we could successfully insert the pdf document even in our test environment.




Thanks
0
SubhaBabu
Asked:
SubhaBabu
  • 3
2 Solutions
 
ChrisKingCommented:
does your code have something like the following
    SET stringsize 16384

you may need to up your maximum string size
0
 
SubhaBabuAuthor Commented:
Nope i don't have any like that.  I am using  pure java driver (jconn2.jar) to talk to database from  my java tier.
0
 
ChrisKingCommented:
you might have to post a cut down version of the code
0
 
Joe WoodhousePrincipal ConsultantCommented:
The text/image size is a connection property of your Java connection string. If you don't explicitly set it, it defaults to a size depending on the client you're using.

For example, through a regular isql I believe it will default to 32Kb.

I don't know Java so I don't know exactly what it will be. You may also be able to send the "SET" command that ChrisKing (hi Chris) mentioned to explictly set it for the duration of this session, but then you'll have to do this for every connection every time.
0
 
ChrisKingCommented:
(hi joe)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now