Symptom

BLOB images stored in SQL Server that exceed 32,767 bytes when using ODBC or 1024,000 bytes when using other DBMS fail to display in DataWindow objects.


Environment

All PowerBuilder versions


Cause

When connecting via ODBC, the default value of the PBMaxBlobSize parameter in pbodb.ini is set to 32,767 bytes (32KB), which limits the maximum BLOB size that can be transferred to the DataWindow.

https://docs.appeon.com/pb2025r2/connecting_to_your_database/PBODB_settings.html

When connecting via other DBMS, the default value of the PBMaxBlobSize parameter is 1024,000, which limits the maximum BLOB size that can be transferred to the DataWindow.

https://docs.appeon.com/pb2025r2/connection_reference/PBMaxBlobSize.html


Resolution

For ODBC, modify pbodb.ini

In the pbodb.ini file under the [Microsoft SQL Server] configuration section, add or update the parameter to increase the BLOB transfer limit:

PBMaxBlobSize='3276700'

Note: If PowerBuilder IDE is installed, edit the file located at %LocalAppData%\Appeon\PowerBuilder [version]\. If the IDE is not installed, update the pbodb.ini in the runtime directory.


For other DBMS, specify the DBParm 'PBMaxBlobSize'

Configure the database connection as needed. Following is an example for reference:

SQLCA.DBMS = "MSOLEDBSQL SQL Server"
SQLCA.DBParm = "Database='<your_db>',Provider='MSOLEDBSQL19',PBMaxBlobSize=10240000"

 


 

0
0