Class TCloneTable (unit ClTable) |
TTable
Clone Table V1.02 - released June 18, 1998 Copyright(c) 1997-1998 by Demian Disclaimer: This component is distributed as Freeware. There is no charge or warranty whatsoever. The author will not be held responsible for any direct or indirect damage resulting from the use of the component or any derivatives thereof. In short: USE IT AT YOUR OWN RISK! You are allowed to include the component code in any commercial or non commercial product. You are also allowed to make as many copies of the component as you want and distribute them, as long as you do not receive any money for the copying/distribution. You can send any comments, suggestions and bugs to demian@bhnet.com.br New versions can be found at: http://www.bhnet.com.br/~demian http://web.unix.horizontes.com.br/~demian If you do any modification to this code, please send me a copy. If you use this code on any 'real-life' application, please let me know. If you think this code is completely useless, please DON'T LET ME KNOW! What it does: Provides the client a relatively quick way to get a cursor for a table that is already opened. This is accomplished through the new method 'AssignCursor'. The cloned cursor can be used as a regular cursor, inheriting certain properties from the source cursor, but remaining completely independent in terms of position and ordering. The cloned cursor inherits the following properties from the source cursor: Current index Range Translate mode Share mode Position Field maps Filters How to use it: 1. Install the component [VNM Pallete]; 2. Drop one TTable and one CloneTable onto a form; 3. Set the TTable properties (DatabaseName, TableName, etc); 4. 'Clone' table one: CloneTable1.AssignCursor(Table1); CloneTable1.Open; History: V1.00 - created (August/1997); V1.01 - fixed bug in Handle property; V1.02 - fixed bug in OnClose event; - deleted unnecessary references in Uses clause; Notice: 1. Make sure the source table is opened before calling 'AssignCursor'; 2. Because the cloned table is just a cursor, not all source table properties are inherited (see list in 'What it does'). 3. As a bonus, I've added a write method to the Handle property, so now you can access, in a normal way, those 'misterious' BDE handles. Try the example below for displaying a list of available BDE drivers (link the TCloneTable to a TDatasource/TDBGrid to see the results): {Notice: add 'DBIProcs,DBITypes' to the unit Uses clause;} var MyHandle: HDBICur; begin Check(DBIInit(nil)); Check(DbiOpenDriverList(MyHandle)); CloneTable1.Handle := MyHandle; CloneTable1.Open; end;
Constructors |
Functions |
Properties |
Events |
Variables |
Constructors |
Functions |
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
Properties |
Events |
Variables |