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.