EhLib
ContentsIndexHome
PreviousUpNext
TSQLDataDriverEh Class

Universal driver of data which interact with server by means of SQL and four objects to Select, Delete, Insert, Update data and reselect one record.

Pascal
TSQLDataDriverEh = class(TBaseSQLDataDriverEh);

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.

Copyright (c) 1998-2013. All rights reserved.
What do you think about this topic? Send feedback!