Feature | Ado.Net | DatS layer |
Destruction of objects. | Implicit. It is responsibility of garbage collector. | Explicit. Programmer is responsible for destruction of “root” objects (like a manager, table). “Root” object will destroy “sub” objects (like tables in manager, columns in table, etc) automatically. |
Class names. | DataXXXX | TADDatSXXXX. DatS follows AnyDAC naming conventions. |
| DataSet | TADDatSManager |
Data types. | Not limited to strict set. | Defined by TADDataType enumeration type. This is because of differences between Delphi RTL and .NET CLR. |
Collections. | Support of ICollection and .Net foreach keyword. | DatS supports: property ItemI[AIndex: Integer]: TADDatSXXXX; property ItemS[AIndex: String]: TADDatSXXXX; property Count: Integer; |
More details you can find in AnyDAC_Architecture guide.
Features
Here I want to show general feature list. It is far from to be completed:
- Strong object design
- Storage manager
- Unlimited number of tables per storage
- Relations accross tables
- History of changes across all rows in all tables
- Unlimited undo changes support
- Tables
- Unlimited number of columns per table
- Unlimited number of constraints per table
- Unlimited number of views per table
- Importing rows from other tables
- History of changes across all rows
- Unlimited undo changes support
- Referential integrity between tables
- Columns
- Any of Delphi TFieldType data type
- Autoincremental columns
- Calculated by expression default values
- Calculated by expression or by callback columns
- Constraints
- Primary key
- Unique keys
- Foreign keys
- Checks
- Rows
- RowID
- Each row is represented by object
- Row change history
- Associated error after posting changes to DB
- Views
- Multiple sorting and filtering mechanisms per view
- 8 effective filtering mechanism kinds
- Filtering and seaching use sorted views
- Views on view or table
- Aggregate values
TADClientDataSet
TADClientDataSet is just TDataSet interface to DatS. And actually, one TADClientDataSet is one or more tables and zero or more views. Tables are used to store data. Views are used to sort, filter, range, process updates and to build indexes and aggregates.
With TADClientDataSet you can create in-memory datasets, using similar to TClientDataSet way:
// create dataset
with ADClientDataSet1.FieldDefs do begin
Add('F1', ftString, 255);
Add('F2', ftDateTime);
Add('F3', ftLargeint);
end;
ADClientDataSet1.CreateDataSet;
// append record to dataset
with ADClientDataSet1 do begin
Append;
Fields[0].AsString := 'qweqwe';
Post;
end;
You can use directly DatS table and views associated with TADClientDataSet:
// iterate through all DatS view rows and read F1 field value
for i := 0 to ADClientDataSet1.SourceView.Rows.Count - 1 do
ADClientDataSet1.SourceView.Rows[i].GetData('F1')
Or you can create, fill and adjust DatS table and view your self. And then attach TADClientDataSet to them:
ADClientDataSet1.AttachTable(oTable, oView);
ADClientDataSet1.Open;
All that gives you almost unlimited flexibility of DatS and standard TDataSet interface to DatS. Neither of existing in-memory dataset gives you that flexibility. More examples, you can find in AnyDAC\DEMO\DatS Layer folder.
Speed
How fast is DatS and TADClientDataSet on top of it ? Beside the fact that AnyDAC is one of the fastest data access engines. It is ... fastest in-memory data engine. Check your self:

Conclusion
Few reasons to use AnyDAC TADClientDataSet:
- if you are using AnyDAC to access your DBMS, then you already have TADClientDataSet in your application. You just need to start to use it;
- if you need unlimited flexibility with in-memory dataset, then AnyDAC will give it to you;
- if you need the best speed at handling your in-memory data, then AnyDAC will give it to you;
- AnyDAC is freeware and very high stable.
If you are not sure, how effective will be our technical support, then you can order high priority technical support.