Accuracer: The First And Only Cross-Platform BDE Replacement
Client-Server Single-File Embedded Database with SQL for Delphi / C++Builder / Kylix
Occurs when the SQL query execution command is received by server.
type TACROnSQL = procedure (
var SQL: String;
var Abort: Boolean
) of object;
property OnSQL: TACROnSQL;
OnSQL occurs when SQL query execution command is received by server.
Sender is a TACRServer component that received a query from client.
ClientInfo is a record with client session connection parameters.
Params is a object with parameters for this query received from client. You can modify any of these parameters.
SQL is a query text - can be single SQL command or SQL script with semi-colon (";") separator between commands.
You can modify query text stored in SQL.
Abort determines if server should discard this query and send error message to the client. By default Abort is set to False. If you set it to True query will not be executed and client will get error message with code 60034 (ACR_CS_ErrorExecutingSQLScript constant in ACRConst unit).
Thus you can use this event for logging, changing and aborting queries.
Use GetClients method to get list of all connected clients.
Also you can learn if client is still connected by IsClientConnected method.