- Sathishkumar S
- PowerBuilder
- Thursday, 12 December 2024 04:10 PM UTC
Hi All,
I am using PowerBuilder 2022 R3 Build 3356 and MS SQL Server 2019 with the collation set to Latin1_General_100_CI_AI_SC_UTF8.
In a DataWindow, I have a column of type string
with a length of 375. I have limited the users to type up to 375 characters only.
In the database, the column data type is varchar(375)
. The user is typing 375 characters, including some dashes.
However, I noticed an issue: the dash (–), which appears as a single character (ASCII code 226), requires 3 characters of storage length in the database. This leads to the DB error: String or binary data would be truncated.
I am using LEN function in PowerScript to find the number of characters typed by the user and display it to them.
Is there a way to find the data length instead of the number of characters?
Are there any other properties available to handle this?
Do you have any alternative ideas?
I need your help to resolve this issue.
Thank you in advance,
Sathishkumar S.
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.