DATA_Type
DATA_Type: TvxClientDataSet
Example
procedure ScriptEvent(var Value: variant);
begin
CreateData(DATA_Type, ['Num,integer', 'Code,string,50', 'Description,string,100']);
DATA_Type.Append;
DATA_Type['Num'].AsInteger := 1;
DATA_Type['Code'].AsString := 'EXAMPLE';
DATA_Type['Description'].AsString := 'Example shipment type';
DATA_Type.Post;
Value := DATA_Type.RecordCount;
end;
Usage
DATA_Type provides the friendly dataset currently used by helper conventions for VxData shipment-type reference data.
Conventional VxData context
Despite the generic public suffix, the current Velox helper uses the application-scoped Shipment_Type table. That table supplies its number, application, code and description.
This convention guides queries and field names; it is not a runtime schema contract. Custom SQL, configuration and customer extensions may return a different subset, aliases or additional columns. Use FindField for optional fields and validate types at the integration boundary.
Behaviour, lifecycle and side effects
- Velox loads all returned rows into memory and preserves fetched string whitespace. Large results can use substantial memory.
- Navigation, filtering, indexing and edits mutate the shared object. Closing or recreating it invalidates retained fields, bookmarks and record positions.
Postupdates the client dataset; it does not prove an external database write or transaction commit. Persistence belongs to the function or SQL used for that purpose.- Data helpers commonly catch and log SQL or creation failures, potentially leaving the object inactive or reset. Invalid field, conversion and dataset-state operations can still raise.
- Action cleanup closes friendly datasets. Velox owns the object; scripts must not free it or rely on its records surviving another action execution.
- The mutable dataset and cursor are not thread-safe. Do not pass the reference to asynchronous work or allow nested code to reposition it without an explicit contract.
Additional Technical Info
DATA_Type is an action-owned friendly dataset intended for the role described below. It is a live TvxClientDataSet reference; its name does not load data, select a connection, execute SQL or impose a field layout.
Runtime binding and identity
Velox constructs the object with the action and binds DATA_Type to TvxActionMan.FData43. Its diagnostic dataset name is DATA_Type.
The dataset begins inactive and without fields. CreateData, Data query helpers and load methods can each replace its schema and records. Every script using the action observes the same live cursor, filters, indexes and edits until it is closed or repopulated.
Implementation and naming cautions
Do not treat DATA_Type as a universal type registry. Another explicit population call can reuse it with any schema, and a shipment-type code is meaningful only within its configured application/domain.
The friendly suffix does not validate record type, authenticate a user or party, enforce application/tenant scope, apply foreign keys or prevent reuse for unrelated data.
Related entries
Datasetsexplains cursor, field, edit and ownership rules.CreateDatacreates an explicit in-memory schema.GetDataandGetDataFromDBexplicitly populate a dataset.TvxClientDataSetis the exposed class.DATA_Shipmentdocuments the separate shipment-header workspace.
External references
- Embarcadero DocWiki:
TClientDataSetdocuments the inherited Delphi in-memory dataset. - Embarcadero DocWiki:
TDataSetdocuments the inherited cursor and edit model. - Free Pascal:
TDataSetprovides compatibility context; Velox uses Delphi and its own descendant.