JSDO properties, methods, and events reference : readLocal( ) method
  

readLocal( ) method

Clears out the data in JSDO memory and replaces it with all the data stored in a specified local storage area, including any pending changes and before-image data, if they exist.
Return type: boolean
Applies to: progress.data.JSDO class
Working record: After execution, no working records are set for the tables of the JSDO.

Syntax

readLocal ( [ storage-name ] )
storage-name
The name of the local storage area whose data is to replace the data in JSDO memory. If storage-name is not specified, blank, or null, the name of the default storage area is used. The name of this default area is jsdo_serviceName_resourceName, where serviceName is the name of the Data Object Service that supports the JSDO instance, and resourceName is the name of the resource (table, dataset, etc.) for which the JSDO instance is created.
This method returns true if it successfully reads the data from the local storage area; it then replaces JSDO memory with this data. If the storage area has no data (is empty), this clears JSDO memory instead of replacing it with any data, and the method also returns true. If storage-name does not exist, but otherwise encounters no errors, the method ignores (does not clear) JSDO memory and returns false. If the method does encounter errors (for example, with the data in the specified storage area), it also leaves JSDO memory unchanged and throws an exception.
You can call the JSDO saveChanges( ), acceptChanges( ), or rejectChanges( ) method after calling this method, and any changes read into JSDO memory from local storage are handled appropriately.

Example

The following code fragment replaces the data in JSDO memory with all the data currently stored in the default storage area:
dataSet = new progress.data.JSDO( 'dsStaticData' );
dataSet.fill();
dataSet.saveLocal();
.
.
.
dataSet.readLocal();

See also:

acceptChanges( ) method, fill( ) method, rejectChanges( ) method, saveChanges( ) method, saveLocal( ) method