GetFullState method (DataWindows)
Description
Retrieves the complete state of a DataWindow or DataStore
as a blob.
This method is used primarily in distributed applications.
Controls
DataWindow type |
Method applies to |
---|---|
PowerBuilder |
DataWindow control, DataStore object |
Web ActiveX |
DataWindow control |
Syntax
[PowerBuilder]
1 |
long <span>dwcontrol</span>.<span>GetFullState</span> ( blob <span>dwasblob</span> ) |
[Web ActiveX]
1 |
number <span>dwcontrol</span>.<span>GetFullState</span> ( ) |
Argument |
Description |
---|---|
dwcontrol |
A reference to a DataWindow control or |
dwasblob |
A variable into which the returned DataWindow For the Web ActiveX, call GetFullStateBlob to get the value instead |
Return Values
Returns the number of rows in the DataWindow blob if it succeeds
and –1 if an error occurs. GetFullState will
return –1 if the DataWindow control or DataStore does not
have a DataWindow object associated with it.
If any argument value is null, in PowerBuilder and JavaScript
the method returns null.
Usage
GetFullState retrieves the entire state
of a DataWindow or DataStore, including the DataWindow object specification,
the data buffers, and the status flags. When you call SetFullState to
apply the blob created by GetFullState to another
DataWindow, the target DataWindow has enough information to recreate
the source DataWindow.
Because the blob created by GetFullState contains
the DataWindow object specification, a subsequent call to SetFullState will
overwrite the DataWindow object for the target DataWindow control
or DataStore. If the target of SetFullState does
not have a DataWindow object associated with it, the blob will assign
one. In this case, SetFullState has the effect
of setting the DataObject property for the target.
When you use GetFullState and SetFullState to
synchronize a DataWindow control on a client with a DataStore on
a server, you need to make sure that the DataWindow object for the
DataStore contains the presentation style you want to display on
the client.
Examples
These statements retrieve data into a DataStore and
use GetFullState to retrieve the complete state
of the DataStore into a blob:
1 |
// Instance variables: |
1 |
// datastore ids_datastore |
1 |
// blob blb_data |
1 |
long ll_rv |
1 |
1 |
ids_datastore = create datastore |
1 |
ids_datastore.dataobject = "d_emplist" |
1 |
ids_datastore.SetTransObject (SQLCA) |
1 |
ids_datastore.Retrieve() |
1 |
ll_rv = ids_datastore.<span>GetFullState</span>(blb_data) |