?
Solved

Sybase Image column gets truncated to 16K

Posted on 2006-05-23
7
Medium Priority
?
1,232 Views
Last Modified: 2008-01-09
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
Comment
Question by:SubhaBabu
  • 3
5 Comments
 
LVL 6

Accepted Solution

by:
ChrisKing earned 252 total points
ID: 16747769
does your code have something like the following
    SET stringsize 16384

you may need to up your maximum string size
0
 
LVL 2

Author Comment

by:SubhaBabu
ID: 16751266
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
 
LVL 6

Expert Comment

by:ChrisKing
ID: 16751502
you might have to post a cut down version of the code
0
 
LVL 24

Assisted Solution

by:Joe Woodhouse
Joe Woodhouse earned 248 total points
ID: 16754859
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
 
LVL 6

Expert Comment

by:ChrisKing
ID: 16756524
(hi joe)
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I came across an unsolved Outlook issue and here is my solution.
Applications for our next round of the Experts Exchange Scholarship Contest are starting to roll in. It made us wonder what our past winners are up to these days. Here's a look at what four winners experienced with the contest and what they're doing…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses
Course of the Month15 days, 17 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question