<< Click to Display Table of Contents >> Navigation: Components > ciDBMacroStrInjector |
Very similar to the ciMacroStrInjector component, this component allows the association to a DataSource component and thus trigger events that may be notified by it. So you can make any code aware of the state of your table via the TDataSource property built in this component.
Imagine that you are browsing a DbGrid, closing a table, deleting or inserting records and you want to update in real time the data of the actual record of your table with other components or with your HTML page. This is the way to carry out this task in a transparent and uncomplicated way.
Otherwise it would be dependent on the individual components with database support as found in uniGUI for example or in the VCL.
The DataSource property is the only difference between the two components as shown below.
fig 1 - ciDBMacroStrInjector in Object Inspector
The property DATASOURCE should be associate with a TDataSource component to be monitored and trigger events. See events below
fig 2 - ciDBMacroStrInjector events
As a regular DataSource events, is triggered to notify the component to react to any changes in state of the Table associated to this TDataSource. Hence, you can make you code read as a link to data manipulated in you database.