[Gambas-user] Database: Events BeforeSave(...) and BeforeDelete(...)
hans at gambas-buch.de
Mon Jul 15 08:56:11 CEST 2019
For a SQLite database project for our online book - in which all field
types are used - I would like to insert an image (field type db.Blob)
for each record. I also want to use the most important control elements
from the component gb.db.form (DataSource, DataBrowser with navigation
bar (New, Save, Update, Delete, Forward, Backward, Start and End),
I would like to implement the following:
Before saving a new or changed dataset, it should be determined whether
an image has already been saved. If this is NOT the case, the image
should be saved after an image selection dialog.
Before deleting a dataset, you should ask whether the dataset should
actually be deleted. At the moment the data record is deleted
immediately without any further inquiry!
For both tasks the two events BeforeSave( Data As Result ) and
BeforeDelete( Keys As Variant ) are obvious. But I have no idea how to
handle both tasks with it? Can anyone help with ideas or even source code?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the User