cancel
Showing results for 
Search instead for 
Did you mean: 

SELECTBLOB truncates data with native Open Client drivers

Former Member
0 Kudos

Hello,

I searched the forum for related topics and I think this thread is close to the issue I'm having:

https://archive.sap.com/discussions/thread/3323415

However, OP was using ODBC drivers. I'm using Open Client driver (SYC Sybase System 10/11), and from what I read, the PbMaxBlobSize is not relevant for this driver.

The application which is causing the problem was written a (long) while ago in PowerBuilder 7 and uses SELECTBLOB to retrieve a long field of type text. Then it casts it to a string. As far as I can tell, the string is shorter than the original text field after this operation (it's truncated to around 32k).

The strange thing is that it used to work perfectly fine with Sybase 15.5 ESD4.4 running on AIX. The backend changed to Sybase 15.7 sp136 running on Linux and the problem started to happen.

Absolutely nothing changed on the client side (application, drivers, connection settings, etc). The database from the old system was restored to the new system, so should be identical too.

Here's the relevant part of the powerbuilder code, which retrieves the large text field:

BLOB bformat

SELECTBLOB format_text

INTO :bformat

FROM ht_report

WHERE reportid = :rep_id using mytrans;

if mytrans.SQLCode <> 0 then

sError = "Failed to read report syntax via SELECTBLOB - " + string(myTrans.SQLDBCode) + ": " + myTrans.SQLErrText

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

resetReport()

return false

end if

lds_reportDetails.Object.ht_report_format_text[1] = string(bFormat)

We're very as far as code changes are concerned, so I was wondering if there is anything in the database or connection settings, that can be used to overcome this problem

Accepted Solutions (0)

Answers (0)