DataStore object
A DataStore is a nonvisual DataWindow control. DataStores act just
like DataWindow controls except that many of the visual properties
associated with DataWindow controls do not apply to DataStores. Because
you can print DataStores, PowerBuilder provides some events and functions
for DataStores that pertain to the visual presentation of the data.
However, graph functions such as CategoryCount, CategoryName,
GetData, SeriesCount, and so forth depend on the visual graph control,
which is not created for a DataStore object. These functions return an
error value or an empty string when used with DataStores.
Properties
DataStore property |
Datatype |
Description |
---|---|---|
DataObject |
String |
Specifies the name of the DataWindow or Report |
ClassDefinition |
PowerObject |
An object of type PowerObject containing |
Object |
DWObject |
Used for the direct manipulation of objects within |
Events
Some but not all DataStore events have return codes that you can
use to determine what action will be taken after the event occurs. You
set the return codes in a RETURN statement in the event script.
DataStore event |
Occurs |
---|---|
Immediately before the Open event occurs in the |
|
When a database error occurs in the Return codes: 0 – (Default) 1 – Do not display the |
|
Immediately after the Close event occurs in the |
|
When an error is found in a data or property |
|
When the AcceptText and Update functions are called Return codes: 0 – 1 – Reject the data 2 – Reject |
|
When a value imported into a DataStore from a Return 0 – (Default) Reject the data value and show 1 – Reject the data value with 2 – Accept the data 3 – Reject the data value but allow focus to If the return code is 0 or 1 (rejects the |
|
When the printing of the DataStore |
|
Before each page of the DataStore is formatted for Return codes: 0 – Do not skip 1 – Skip a page. |
|
When the printing of the DataStore |
|
When the retrieval for the DataStore is |
|
After a row has been retrieved. Return 0 – (Default) Continue. 1 – Stop |
|
When the retrieval for the DataStore is about to Return codes: 0 – (Default) 1 – Do not perform the 2 – Do not reset the rows and buffers |
|
After a Retrieve, Update, or ReselectRow function The following return codes specify the 0 – (Default) 1 – Stop. 2 – Skip this |
|
When all the updates from the DataStore to the |
|
After an Update function call and just before Return codes: 0 – (Default) 1 – Do not perform the |
Functions
DataStore function |
Datatype returned |
Description |
---|---|---|
Integer |
Applies the contents of the DataStore’s edit |
|
Integer |
Returns the number of categories in the specified |
|
String |
Returns the name of the specified category in the |
|
String |
Returns the name assigned to the |
|
Integer |
Deletes all items from the value list associated |
|
Integer |
Copies the specified graph in the DataStore to the |
|
String |
Returns the selected text, pictures, and input |
|
Integer |
Creates a DataWindow object using the specified |
|
Integer |
Creates a DataStore object from the passed |
|
Long |
Returns the number of data points in the specified |
|
Integer |
Cancels a database retrieval in |
|
Long |
Returns the number of rows that have been deleted |
|
Integer |
Deletes the specified row from the |
|
String |
Returns requested information about the structure |
|
String |
Exports data from the DataWindow control, DataStore |
|
Integer |
Moves rows that do not meet the current filter |
|
Integer |
Returns the number of rows that do not meet the |
|
Long |
Returns the number of the first row that meets the |
|
Integer |
Returns the number of the specified category in the |
|
Long |
Searches starting at a specified row for the first |
|
Integer |
Identifies the required columns that the user has |
|
Integer |
Returns the number of the specified series in the |
|
Integer |
Creates an HTML Form element containing columns for |
|
Long |
Returns an EAServer result set from a PowerBuilder Obsolete GenerateResultSet is an obsolete |
|
Border (enumerated) |
Returns a Border enumerated datatype indicating the Box! Lowered! NoBorder! Raised! ResizeBorder! ShadowBox! Underline! |
|
Long |
Retrieves changes made to a DataStore into a blob. |
|
Integer |
Stores in the specified variable the name of the |
|
Integer |
Obtains the number of the column the user clicked |
|
Long |
Obtains the number of the row the user clicked or |
|
Integer |
Returns the number of the current column in the |
|
String |
Returns the name of the current column in the |
|
Integer |
Creates a reference to a context-specific instance |
|
Double |
Returns the value of the specified data in the |
|
Integer |
Reports the percentage that a pie slice is exploded |
|
Integer |
Finds out the appearance of a data point in a |
|
Integer |
Returns the value of the specified data in the |
|
String |
Returns the format used for display in the |
|
Long |
Retrieves the complete state of a DataStore into a |
|
Date |
Returns the date data in the specified row and |
|
DateTime |
Returns the datetime data in the specified row and |
|
Decimal |
Returns the decimal data in the specified row and |
|
Double |
Returns the numeric data in the specified row and |
|
dwItemStatus (enumerated) |
Returns the status of the item at the specified row DataModified! New! NewModified! NotModified! |
|
String |
Returns the string data in the specified row and |
|
Time |
Returns the time data in the specified row and |
|
Long |
Returns the number of the first row that was |
|
PowerObject |
Returns a reference to the name of the parent |
|
Long |
Returns an integer containing the number of the |
|
Long |
Gets the row number of a row in a DataStore from |
|
Long |
Gets the unique row identifier of a row in a |
|
Integer |
Returns the number of the first selected row after |
|
Integer |
Finds out the appearance of a series in a graph. |
|
String |
Returns the current SELECT statement for the |
|
Long |
Retrieves the current status of the internal state |
|
String |
Returns the text in the edit control over the |
|
Integer |
Returns the values in the DataStore Transaction |
|
String |
Returns the validation rule used in the specified |
|
String |
Returns the specified item in the value list for |
|
Integer |
Recalculates the breaks in the groups in the |
|
Long |
Copies data from the clipboard to the |
|
Long |
Copies data from a file to the |
|
Long |
Inserts data from a JSON string into the |
|
Long |
Inserts data from a JSON string into the DataStore |
|
Long |
Copies data from a string to the |
|
Integer |
Inserts a rich text format or plain text file into
This function applies only to DataStores |
|
Long |
Inserts a new initialized row before the specified |
|
Boolean |
Returns true if the specified row in the DataStore |
|
Long |
Returns the number of rows that have been modified |
|
String |
Uses the specification contained in a string to |
|
Long |
Pastes rich text data from a string into a |
|
Boolean |
Adds an event to the end of the message queue for |
|
Integer |
Sends the content of the DataStore to the current |
|
Integer |
Cancels the print job and deletes the spool file This function has two syntaxes. Use Syntax 1 |
|
Integer |
Accesses the database to reselect all columns that |
|
Integer |
Clears all the data from a |
|
Integer |
Resets the color of a data point to the color |
|
Integer |
Stops the DataStore from using a programmer-defined |
|
Integer |
Resets the update flags for the |
|
Long |
Causes the DataStore to retrieve rows from the |
|
Long |
Returns the number of rows currently available in |
|
Integer |
Copies a range of rows from one DataStore to |
|
Integer |
Discards a range of rows. The rows cannot be |
|
Integer |
Clears a range of rows from a DataStore and inserts |
|
Integer |
Saves the content of the DataStore to the specified |
|
Long |
Saves the content of a DataStore into a standard |
|
Integer |
Saves the PDF file into a blob variable when you |
|
Integer |
Selects or deselects the specified row of the |
|
Integer |
Returns the number of series in the specified |
|
String |
Returns the name of the specified series in the |
|
Integer |
Sets the border style of the specified column in |
|
Long |
Applies changes captured with GetChanges to a |
|
Integer |
Makes the specified column the current column in |
|
Integer |
Explodes a pie slice in a pie graph. (Returns an |
|
Integer |
For the specified data point in the specified |
|
Integer |
Sets the height of each row in a specified |
|
Integer |
Defines the filter criteria for the DataStore. The |
|
Integer |
Sets the display format for the specified column of |
|
Long |
Applies the contents of a DataWindow blob retrieved |
|
Integer |
Accepts action and context information about user Obsolete SetHTMLAction is an obsolete |
|
Integer |
Sets the value of the specified row and column of |
|
Integer |
Sets the status of a row in a specified column of |
|
Integer |
Moves an object within the DataStore to another |
|
Integer |
Makes the specified row the current row in the |
|
Integer |
For the specified series in the specified graph. |
|
Integer |
Defines the sort criteria for the DataStore. The |
|
Integer |
Sets the current SQL statement for the |
|
Integer |
Changes the current SELECT statement for the |
|
Integer |
Replaces the text in the edit control at the |
|
Integer |
Sets values in the DataStore’s internal Transaction |
|
Integer |
Sets the Transaction object for the DataStore and |
|
Integer |
Changes the validation rule used for the specified |
|
Integer |
Sets the value of the specified item in the value |
|
Integer |
Causes a DataStore (or DataWindow control) to use a |
|
Integer |
Shares data between a primary DataStore (or |
|
Integer |
Turns off sharing for the DataStore. If the |
|
Integer |
Sorts the rows of the DataStore based on its |
|
Integer |
Triggers a specified event in the DataStore and |
|
Object |
Returns the type of the DataStore. |
|
Integer |
Sends to the database all inserts, deletes, and |