Can someone explain to me what the purpose of these different SQL's are as I'm confused?
The values of these properties (SQLInsert, SQLUpdate, etc) are templates for query statements, and they cannot be manually executed. Usually there is no need to fill these properties because the text of the query is generated automatically.
In special cases, you can set these properties to perform more complicated processing during a query. These properties are automatically processed by MyDAC during the execution of the Post, Delete, or RefreshRecord methods, and are used to construct the query to the server. Their values can contain parameters with names of fields in the underlying data source, which will be later replaced by appropriate data values.
For example, you can use the SQLInsert template to insert a row into a query instance as follows.
1. Fill the SQLInsert property with the parametrized query template you want to use.
2. Call Insert.
3. Initialize field values of the row to insert.
4. Call Post.
The value of the SQLInsert property will then be used by MyDAC to perform the last step.
Setting these properties is optional and allows you to automatically execute additional SQL statements, add calls to stored procedures and functions, check input parameters, and/or store comments during query execution. If these properties are not set, the MyDAC dataset object will generate the query itself using the appropriate insert, update, delete, or refresh record syntax.
removes the record from the query and executes the SQL in SQLDelete?
Yes, you are right.
what happens when I execute the statement Q->Execute();
The statement that is stored in the SQL property (but not the SQLUpdate property) will be executed.