AddUpdateObject

Description

Adds the DataWindow, DataWindowChild, or DataStore that need to update data, so that these objects can update data in one request.

Applies to

BatchDataObjects object

Syntax

objectname.addupdateobject ( datawindow obj {, accept {, resetflag } } ) 

Argument

Description

objectname

A reference to the BatchDataObjects object.

obj

The DataWindow control, DataStore, or child DataWindow to be added to the BatchDataObjects object.

accept

(Optional) A boolean value specifying whether DataWindow/DataStore/DataWindowChild should automatically perform an AcceptText prior to performing the update:

True -- (Default) Perform AcceptText. The update is canceled if the data validation fails.

False -- Do not perform AcceptText.

resetflag

(Optional) A boolean value specifying whether DataWindow/DataStore/DataWindowChild should automatically reset the update flags:

True -- (Default) Reset the flags.

False -- Do not reset the flags.


Return value

Integer.

Returns the index of the DataWindow if it succeeds and -1 if an error occurs. If any argument's value is null, the method returns null.

Examples

The following code example adds the dw_3 DataWindow:

BatchDataObjects lbdo_test
int li_return
li_return = lbdo_test.AddUpdateObject (dw_3)

See also

AddRetrieveObject

GetCount

Reset