Powerbuilder: Change Updatable Columns at Runtime

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chibbie23
    New Member
    • Mar 2010
    • 44

    #1

    Powerbuilder: Change Updatable Columns at Runtime

    Hi,

    I don't know where to place this question, can't seem to find a topic dedicated for powerbuilder. Anyway, I have an application, I'm working on a particular window, inside this window, I have a datawindow which is updatable. The updatable columns are defined. This datawindow is retrieved during the open event (parameters were passed via openwithparm). Before I save, i check whether the columns are updated (I compare the primary value with the current value), if the column has not changed, I want it to be excluded in the generated update stement when I call update(). I just can't find a way to do this.

    The problem is, outside the application, I have a job that updates the value of these columns, lets say it updates col1, and if it updates the column while I'm inside the window, meaning I have retrieved the record already inside my application, when I save the window, it includes col1 in the update statement and use the initial value I have retrieved, meaning I am overwriting the value updated by the job.

    The question is, is there a way to exclude columns from list of updatable fields of a datawindow during runtime?

    Any help is much appreciated.

    Update: I am only updating one record on this window.
    Last edited by chibbie23; Jul 12 '13, 04:23 PM. Reason: Clarrifications
  • chibbie23
    New Member
    • Mar 2010
    • 44

    #2
    This is such a newbie question. Saw the code for this

    dw_control.Obje ct.col1.update = "no"

    OR

    dw_control.Modi fy("col1.Updat e = No")

    Comment

    Working...