Save event
Description
Occurs when the server application notifies the control that
the data has been saved.
Event ID
Event ID |
Objects |
---|---|
pbm_omnsave |
OLE |
Parameters
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 |
long ll_row |
1 |
// Find the row with information for the Excel file |
1 |
ll_row = dw_1.Find("file_name = 'expenses.xls'", & |
1 |
   1, 999) |
1 |
1 |
IF ll_row > 0 THEN |
1 |
   // Make the found row current |
1 |
   dw_1.SetRow(ll_row) |
1 |
1 |
   // Put today's date in the last_updated column |
1 |
   dw_1.Object.last_updated[ll_row] = Today( ) |
1 |
1 |
   // Update and refresh the DataWindow |
1 |
   dw_1.Update( ) |
1 |
   dw_1.Retrieve( ) |
1 |
ELSE |
1 |
   MessageBox("Find", "No row found") |
1 |
END IF |
See Also
Document get from Powerbuilder help
Thank you for watching.
Subscribe
Login
0 Comments
Oldest