Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

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!

Former Member
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:

http://www.sybase.com/detail?id=1058501&id=1058501

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.

1 View this answer in context
Not what you were looking for? View more on this topic or Ask a question