1. Vipin Dwivedi
  2. PowerBuilder
  3. Tuesday, 11 May 2021 05:01 AM UTC

Hello Appeon Folks,

Greeting!

I need to increase the column size of one database field. What is the best and optimal way to reflect those changes in all Powerbuilder objects where it has been referenced?

Thanks,

Vipin

Olan Knight Accepted Answer Pending Moderation
  1. Wednesday, 12 May 2021 13:42 PM UTC
  2. PowerBuilder
  3. # 1

What Chris said.

However, if the expanded database field is a visible field on a DW, you may need to expand the width of the visible field in order to accommodate the new size of the data displayed. In that case you will need to either:
   EDIT the DW and manually resize the field, or
   EDIT SOURCE, find the displayed column, and change the value of the width specification.


Later -

Olan

Comment
  1. Miguel Leeuwe
  2. Wednesday, 12 May 2021 14:18 PM UTC
I think this is what Roland is saying, but just in case:

Modify any "Edit.Limit" values if different to 0 to reflect the new length.

I'd do all of these changes by editing the source code.

regards
  1. Helpful
  1. Vipin Dwivedi
  2. Wednesday, 12 May 2021 15:22 PM UTC
I am trying to write a tool which will read all SRD files, open in file mode and do the find replace. Do you think this would work?



Vipin
  1. Helpful
  1. Miguel Leeuwe
  2. Wednesday, 12 May 2021 20:31 PM UTC
You could use notepad++ to do that. Find and replace in files.
  1. Helpful
There are no comments made yet.
Mark Goldsmith Accepted Answer Pending Moderation
  1. Tuesday, 11 May 2021 22:51 PM UTC
  2. PowerBuilder
  3. # 2
 

Hi Vipin,

Another way you can change DWOs in addition to Chris' suggestion, if you're not comfortable editing the source code, is open the datawindow object and select the Data icon to modify the Data Source. Once there deselect that column (do not click the Return icon yet) and then immediately re-select it. Then click the Return icon. Your changes will be reflected in the Column Specifications window. As well, any changes you had previously made to the properties of that column (EG background colour etc.) will remain intact.

HTH...regards,

Mark

Comment
  1. Vipin Dwivedi
  2. Wednesday, 12 May 2021 15:07 PM UTC
Our Most datawindow opens in SQL syntax mode. Convert to design does not bring the design completely so not possible this option.
  1. Helpful
  1. mike S
  2. Wednesday, 12 May 2021 16:35 PM UTC
you can just add a space (and delete it) in syntax mode to make PB think it changed.

the downside to this method is that PB may remove update information because PB IDE has never been fixed to address this problem.



  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 11 May 2021 16:21 PM UTC
  2. PowerBuilder
  3. # 3

Hi Vipin;

  Once you have made the Column data specification change in the DB Schema, you can use the IDE's "Search" feature for that table / column name. That should bring you up a list of DW objects and/or inline SQL located in your PowerScript code. For the PowerScriupt, its easy to just verify that in the Select INTO :Var, that the variable is of the correct size and data type. For DWO's though, you will have to manually edit their source code and change the affected column(s) definition in the DWO source to be of the proper size and/or data type.

HTH

Regards ... Chris

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.