Turns off the sharing of data buffers for a DataWindow control or DataStore.
DataWindow type |
Method applies to |
---|---|
PowerBuilder |
DataWindow control, DataWindowChild object, DataStore object |
Web ActiveX |
DataWindow control, DataWindowChild object |
integer dwcontrol.ShareDataOff ( )
number dwcontrol.ShareDataOff ( )
Argument |
Description |
---|---|
dwcontrol |
A reference to a DataWindow control, DataStore, or child DataWindow |
Returns 1 if it succeeds and –1 if an error occurs. If dwcontrol is null, ShareDataOff returns null.
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.
These statements establish the sharing of data among three DataWindow controls and then turn off sharing for one of the secondary DataWindow controls:
CONNECT USING SQLCA;
dw_corp.SetTransObject(SQLCA)
dw_corp.Retrieve()
dw_corp.ShareData(dw_emp)
dw_corp.ShareData(dw_dept)
... // Some processing
dw_emp.ShareDataOff()