I am forking on a AIR desktop application with sqlite database.
I have a form created in a custom component which have 2 buttons save and update.
I have created a class to handle all database related functionalities.
when i click on the save button of the form, data is inserted into the table.
So far it's working fine.
No when data is inserted in database, i want to disable the save button, and activate the update button on the form. To run the update query i need id of the last added row, which i can obtain from lastInsertRowID on SQLEvent.RESULT event.
My question is how can i pass this ID from my class to the custom component?
You can create a public bindable property in your custom component. And set this property from a class which handles your DB activitis. You can find explore BindingUtils class if you want to run some function when a particular property value is changed.
Hope this helps.