Extend TIBCLoader beyond event driven design when loading data.
Currently TIBCLoader allows only to Load data by handling particular events. If I want to save something to database I need to handle OnPutData event. Unfortunately this solution requires usage of global variables because to know what I want to insert I need to look for some data beyond the scope of an event.
Even the simple demo of yours shows this problem. You are using a global variable Count to know how much data you want to put it. Rest of the data you are using in a demo is random so it could be generated locally in the event but with a real data again you need to access some objects that are outside of the event.
This makes TIBCLoader unusable in most cases. I propose to extend design of the component so we could tell explicitly when to add rows to the internal buffer of TIBCLoader.
Example:
Loader.PutColumnData()
Loader.PutColumnData()
Loader.PutColumnData()
Loader.NextRow; //This generates internal insert statement
Loader.PutColumnData()
Loader.PutColumnData()
Loader.PutColumnData()
Loader.NextRow; //Another insert statement added to the internal buffer
//...
Loader.Load; //Send buffer to Firebird.
![](https://secure.gravatar.com/avatar/e7a85feabc1af7ccb6cd7227f94d0696?size=40&default=https%3A%2F%2Fassets.uvcdn.com%2Fpkg%2Fadmin%2Ficons%2Fuser_70-6bcf9e08938533adb9bac95c3e487cb2a6d4a32f890ca6fdc82e3072e0ea0368.png)