ShareDataOff method (DataWindows)
Description
Turns off the sharing of data buffers for a DataWindow control
or DataStore.
Controls
DataWindow type |
Method applies to |
---|---|
PowerBuilder |
DataWindow control, DataWindowChild object, DataStore |
Web ActiveX |
DataWindow control, DataWindowChild object |
Syntax
[PowerBuilder]
1 |
integer <span>dwcontrol</span>.<span>ShareDataOff</span> ( ) |
[Web ActiveX]
1 |
number <span>dwcontrol</span>.<span>ShareDataOff</span> ( ) |
Argument |
Description |
---|---|
dwcontrol |
A reference to a DataWindow control, |
Return Values
Returns 1 if it succeeds and –1 if an error occurs.
If dwcontrol is null, ShareDataOff returns
null.
Usage
Two or more DataWindow controls (or DataStores) can share
data. See ShareData for more information about
shared data buffers and primary and secondary DataWindows.
When you call ShareDataOff for a secondary
DataWindow, that control no longer contains data, but the primary
DataWindow and other secondary controls are not affected. When you
call ShareDataOff for the primary DataWindow,
all secondary DataWindows are disconnected and no longer contain
data.
Examples
These statements establish the sharing of data among
three DataWindow controls and then turn off sharing for one of the
secondary DataWindow controls:
1 |
CONNECT USING SQLCA; |
1 |
dw_corp.SetTransObject(SQLCA) |
1 |
dw_corp.Retrieve() |
1 |
dw_corp.ShareData(dw_emp) |
1 |
dw_corp.ShareData(dw_dept) |
1 |
... // Some processing |
1 |
dw_emp.<span>ShareDataOff</span>() |