Powerbuilder 7 crash when data window size is smaller than actual data in DB
I've just started Powerbuilder and came to know this community. Could you advise how to avoid below problem?
In Powerbuilder 7 with Oracle Client 11g, it crashes in case data window column size(eg. Char 50)
is different from DB column size(eg. varchar 200), i.e. data window size is smaller than actual data size. We can't upgrade PB right now. How about substring function ? If it makes sense, can I have some sample code ? Many thanks!
Bruce Armstrong replied
Later versions handled this differently. Some truncated the extra data. Some cancelled the retrieve (without indicating there was a problem) at the record with the issue.
If you did a substring on the column you'd have to rewrite they datawindow query to include the substring.
It's much easier to update the datawindow to match the new column size. I wrote a utility many years back that checked datawindow columns against the underlying table to make sure they matched. It's still available on the old Sybase CodeXchange site:
Look for one called Column Width Checker.
There's a couple of others there too. Once checks for new columns added to the tables, another checks to make sure any edit limits in the datawindow columns match the column lengths.