Look for quick help on saving DataObject(in DataWindow Control) at runtime

Dear all,

I need your help very badly on solving a problem to save a DataObject. I
have created a DataWindow Control, for simplicity, called dw_1. During
run-time, I used this keyword - DataObject - to call up a particular
DataWindow to display within dw_1. And I could bring up any other
DataWindows from a pre-defined set at any one time as I wish. As
declared below:

this.DataObject = 'd_employee_payroll'' (default)
or
this.DataObject = 'd_employee_personals'
or
this.DataObject = 'd_employee_hours_worked'

OK this is how it works. Fine. Let's get to the crux of the problem.
I've written this.of_SetUpdateable(TRUE) in the Constructor Event of
dw_1. All changes made at run-time to the default DataWindow Object
(i.e. d_employee_payroll) can be saved to the database without troubles.
However, once I switch to other DataWindow/DataObject, it looks like
of_SetUpdateable has been reset to false and nothing is saved to the
database. How can I keep the current working mode of dw_1 and still save
every change that's been made to it?  Any kind of advice of suggestion
is welcome and will greatly appreciated. Thanks a lot!

Lawrence

0
Lawrence
9/20/1998 3:35:34 AM
📁 sybase.powerbuilder.pfc
📃 6437 articles.
⭐ 1 followers.

💬 1 Replies
👁️‍🗨️ 326 Views

Are you  doing dw_1.SetTransObjecT( SQLCA )
after you change your dataobject. The transaction is lost when the
dataobject
is changed. So you must do a set trans before you can save any changes.

HTH.

Salman



Lawrence Wong wrote in message <36047806.D47FD2D6@netvigator.com>...
>Dear all,
>
>I need your help very badly on solving a problem to save a DataObject. I
>have created a DataWindow Control, for simplicity, called dw_1. During
>run-time, I used this keyword - DataObject - to call up a particular
>DataWindow to display within dw_1. And I could bring up any other
>DataWindows from a pre-defined set at any one time as I wish. As
>declared below:
>
>this.DataObject = 'd_employee_payroll'' (default)
>or
>this.DataObject = 'd_employee_personals'
>or
>this.DataObject = 'd_employee_hours_worked'
>
>OK this is how it works. Fine. Let's get to the crux of the problem.
>I've written this.of_SetUpdateable(TRUE) in the Constructor Event of
>dw_1. All changes made at run-time to the default DataWindow Object
>(i.e. d_employee_payroll) can be saved to the database without troubles.
>However, once I switch to other DataWindow/DataObject, it looks like
>of_SetUpdateable has been reset to false and nothing is saved to the
>database. How can I keep the current working mode of dw_1 and still save
>every change that's been made to it?  Any kind of advice of suggestion
>is welcome and will greatly appreciated. Thanks a lot!
>
>Lawrence
>


0
Salman
9/20/1998 2:19:37 PM
Reply: