SQL Server Varchar(MAX) fields
- New
- Issue
-
Richard Donagrandi
- PowerBuilder
- Wednesday, 7 May 2025 07:50 PM UTC
We've converted our backend db from SQL Anywhere to MS SQL Server, and any field previously a long varchar was converted to a varchar(MAX) field.
In the past, Powerbuilder would create datawindow column specifications for these fields as char(32766).
I don't know if it's the current PB 2022 R3 3397 build or just interaction with SQL Server, but now, if we edit a datawindow SQL containing one of these fields, PB updates the column specification to char(2147483646) -- which, if it were supported, would be phenomenal -- instead, on retrieve, PB gives the bizarre cryptic error: "Decimal conversion error. Powerbuilder only supports 18 decimal digits."
The workaround, is to Edit Source on the datawindow, and change the column specification back to char(32766).
Vitals:
PBMaxTextSize='2147483647'
PB 2022 R3 build 3397
SQL Server 2022
Windows 11
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.