1. Peter Klopfer
  2. PowerBuilder
  3. Monday, 23 September 2019 12:11 PM UTC

with PB2017, SQL Server 2017, ODBC 13: selected varchar(max)-values will be truncated to 32K, whereas SNC works fine. I tried embedded sql (dynamic cursor) and datawindows.

Is there some datawindow parameter I can set appropriately?

Thanks for some advice.

Roland Smith Accepted Answer Pending Moderation
  1. Monday, 23 September 2019 13:10 PM UTC
  2. PowerBuilder
  3. # 1

Edit pbodb170.ini and find the Microsoft SQL Server section. Change PBMaxTextSize to a larger number, 1,048,576‬ (1MB) for example.

[Microsoft SQL Server]
PBCatalogOwner='dbo'
PBSystemOwner='sys'
PBSyntax='MS_SQLSERVER_SYNTAX'
PBDateTime='MSSQLSERVER_DATETIME'
PBFunctions='MSSQL_FUNCTIONS'
PBSpecialDataTypes='SYBASE_SPECIALDATATYPES'
PBObjectIDs='YES'
PBMaxBlobSize='32767'
PBMaxTextSize='32767'
PBDWDynamic='NO'
PBPrimaryKeyName='YES'
Block=1
SQLSrvrTSPrefix='0x'
PBUseProcOwner='YES'
PBDefaultValues='USER,SYSTEM_USER,USER_ID(),HOST_ID(),HOST_NAME(),DB_ID(),DB_NAME(),CURRENT_TIMESTAMP,NULL'
PBDefaultCreate='YES'
PBDefaultAlter='NO'
PBDefaultExpressions='YES'

 

 

 

Comment
  1. Peter Klopfer
  2. Monday, 23 September 2019 13:24 PM UTC
Roland, thank you very much. You made the rest of my day.

I already knew this PBMaxTextSize parameter by I thought it will only control the SQLServer Text type (and thus I used it for Selectblob).

Besides, I spent nearly an hour to find the correct pbodb170.ini (..users\appdata\local...).



Regards, Peter
  1. Helpful
  1. Roland Smith
  2. Monday, 23 September 2019 13:37 PM UTC
Mike is right, there is also a DBParm for this setting.
  1. Helpful
There are no comments made yet.
mike S Accepted Answer Pending Moderation
  1. Monday, 23 September 2019 13:33 PM UTC
  2. PowerBuilder
  3. # 2

there is also a connection parm of the same name, so it appears to control things the same way?

SQLCA.DBParm="PBMaxTextSize='48000'

the documentation says that it is only for SNC oledb, however i think some of the connection parm docs are often out of date.

 

i hate having to use ini files for these types of runtime parms.  windows security can prevent the ini file from being copied, and then you have a bunch of versions in users directories.  

 

 

Comment
  1. Peter Klopfer
  2. Monday, 23 September 2019 14:00 PM UTC
Mike, thanks for your hint.

But I tried this one already this morning and it didn't work, alas.



Hope that I don't have to copy the ini file into the user dir. Doesn't it suffice to provide it in the program folder on the central file server?

  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.