Save
PowerScript event
Description
Occurs when the server application notifies the control that the
data has been saved.
Event ID
|
Event ID |
Objects |
|---|---|
|
pbm_omnsave |
OLE |
Arguments
None
Return Values
Long.
Return code: Ignored
Usage
If you want to retrieve the ObjectData blob value of an OLE control
during the processing of this event, you must post a user event back to
the control or you generate a runtime error.
Examples
In this example, a table in a database tracks changes of OLE
objects; when the user saves an Excel spreadsheet in an OLE control, this
code puts the current date in a DataWindow so that the database table can
be updated:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
long ll_row // Find the row with information for the Excel file ll_row = dw_1.Find("file_name = 'expenses.xls'", & 1, 999) IF ll_row > 0 THEN // Make the found row current dw_1.SetRow(ll_row) // Put today's date in the last_updated column dw_1.Object.last_updated[ll_row] = Today( ) // Update and refresh the DataWindow dw_1.Update( ) dw_1.Retrieve( ) ELSE MessageBox("Find", "No row found") END IF |
See also
Document get from Powerbuilder help
Thank you for watching.
Subscribe
Login
0 Comments
Oldest