2019 R2 build 2353
connected to SQL Server 17
I have to find a new way to pull out the contents of a text column (not rich text) into a window control for displaying/editing by the user, then update changes back to the text column.
The datawindow only allows for char(32766); I need it to be much more than that. I tried exporting the datawindow, manually changing the limit, importing it back. So now it shows as char(1024000) yet it still only brings back 32766.
I found and tried this blurb from a help file:
Maximum text length
By default, the maximum text length for a DataWindow column is 32 KB. However, for most database drivers,
you can set this length to a higher value. For the PowerBuilder ODBC driver, you can set the maximum text
length in the pbodbxxx.ini file, where xxx is the PowerBuilder version number. If you add "PBMaxTextSize=1024000"
to the section of the INI file for the database to which you are connecting, you change the maximum text length
for a DataWindow column to 1 MB.
I found every instance of pbodb19.ini on my pc and changed the PBMaxTextSize to 1024000. So the MSSQL section looks like this:
[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'
PBMaxTextSize='1024000'
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'
Yet the datawindow column still restricts to char(32766).
I thought it might be because of the "DB Profiles" connection as I am working in dev environment. I exported the profile, added "DBTEXTLIMIT=1024000' to the connection string and imported the profile back into PB:
// Profile mydbprofile
SQLCA.DBMS = "OLE DB"
SQLCA.LogPass = <***********>
SQLCA.LogId = "xx"
SQLCA.AutoCommit = False
SQLCA.DBParm = "PROVIDER='MSOLEDBSQL',DATASOURCE='myserver',PROVIDERSTRING='database=mydatabase',dbtextlimit='1024000'"
Opened the datawindow w/ the revised connection and column in datawindow was still limited to 32766. When I look at the source (SQL), add a random space and click back to the datawindow, the column resets itself from char(1024000) to char(32766).
Hmmm "Sainthood" - a new PB Master level? - LOL!