ehlib里的TSQLDataDriverEh怎么用?
在用ehlib里的控件,希望可以用TSQLDataDriverEh把对象的增删改全部实现,但是sql命令写进去了不知道这么执行,查帮助看到这句话:
To execute command, TSQLDataDriverEh calls global event - DefaultSQLDataDriverResolver.OnExecuteCommand.
这个DefaultSQLDataDriverResolver是什么东西啊,google了半天只有ehlib官网上的唯一结果。
关于TSQLDataDriverEh的全文:
TSQLDataDriverEh is a universal driver of data which interact with server by means of SQL. TSQLDataDriverEh have five objects of the TSQLCommandEh type: SelectCommand, DeleteCommand, InsertCommand, UpdateCommand, GetrecCommand. Each object holds SQL expressions and parameters to execute command to, accordingly, query data, delete record, insert record, update record and get record. To execute command, TSQLDataDriverEh calls global event - DefaultSQLDataDriverResolver.OnExecuteCommand. You should write this event to execute SQL expressions on the server and, if need, return DataSet to read data. When TSQLDataDriverEh is used as provider of data, it takes records from DataSet created in DefaultSQLDataDriverResolver.OnExecuteCommand event and writes them in TMemTableEh. On the measure of the requirement it takes given current record, writes them in TMemTableEh and goes over to following record. When TSQLDataDriverEh is used as handler of changes, it takes a changed record from TMemTableEh, and call DefaultSQLDataDriverResolver.OnExecuteCommand event sending DeleteCommand, InsertCommand or UpdateCommand as a parameter.