Skip to Content
avatar image
Former Member

Discrepancies between Linux and Windows (and AIX) Sybase when handling large text/blob fields


I've been researching this issue for months now. Finally narrowed it down. It happens only on Linux (I'm running Sybase 16.0, but our customer, who's running 15.7 has the same problem). Long story short, when trying to retrieve a field of type TEXT, it get's truncated to around 32k, even though DBTextLimit is set to '600000' in the connection settings. I'm using the native open client drivers btw and for numerous reasons cannot switch to ODBC.

The application which is used to retrieve this field has been written some time ago in PowerBuilder 7. What I noticed is whenever it gets the field contents, they get truncated.

This happens only on Linux. On Windows and AIX all works perfectly fine with the same drivers and connection settings.

I tried increasing 'text prefetch size' in the server's .cfg file, as the default value of 16 (with 2K page size) seemed to tie in with the 32k that the field contents seem to be truncated to. It didn't help.

I'm really running out of ideas. Would greatly appreciate if anyone could steer me in the right direction. Is there anything I can do with the server's configuration, OS configuration or connection parameters to overcome this problem?

Here is the power builder code. Notice the if(len) near the bottom. It does not return the actual size of the field, but something below 32,000 even though the field is well over 32000.

retRes = lds_reportModes.Retrieve(lds_reportDetails.Object.ht_report_reportid[1])

if retRes < 0 then

sError = "Retrieve Error while getting report modes" + string(myTrans.SQLDBCode) + ": " + myTrans.SQLErrText

this.logmessage(2, "CreateReport", sError) resetReport()

return false


this.logmessage(1, "CreateReport", "retrieved " + string(retRes) + " report modes")

end if

BLOB bformat

int rep_id

if len(string(lds_reportDetails.Object.ht_report_format_text[1])) > 32000 then


this.logmessage(1, "CreateReport", "Format string length: " + string(len(string(lds_reportDetails.Object.ht_report_format_text[1]))) )

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers