DATA_ASNINL
DATA_ASNINL: TvxClientDataSet
Example
procedure ScriptEvent(var Value: variant);
begin
CreateData(DATA_ASNLine, ['ProductCode,string,100', 'Qty,double']);
DATA_ASNLine.Append;
DATA_ASNLine['ProductCode'].AsString := 'ITEM-001';
DATA_ASNLine['Qty'].AsFloat := 3;
DATA_ASNLine.Post;
Value := DATA_ASNINL.RecordCount;
end;
Usage
DATA_ASNINL provides an alternate inbound-ASN-line name for the exact same dataset object as DATA_ASNLine.
Conventional VxData context
DATA_ASNINL and DATA_ASNLine are two names for the same dataset. Changes, navigation, filters and edits made through either name are immediately visible through the other. Error messages can refer to DATA_ASNLine. The expected VxData context is the ASN_Line family, not ASN_Hdr.
That convention is guidance for choosing queries and field names, not a guarantee. A configured source/destination or customer extension may expose a different subset or additional columns. Use FindField for optional columns and never assume a named field merely because this page describes the current base schema.
Behaviour, lifecycle and side effects
- Velox loads all returned rows into memory and preserves fetched string whitespace. Large results can use substantial memory.
- Field access, navigation, filtering, indexing, inserts, edits, posts and deletes mutate this shared object. Closing or recreating it invalidates retained fields and record positions.
Postupdates the client dataset; it is not proof of an external database write or transaction commit. SQL/file effects belong to the function used to populate or persist it.- Data helper functions generally catch and log SQL/creation failures, potentially leaving the object inactive or reset. Direct invalid field, conversion or dataset-state operations can raise.
- Action cleanup closes every friendly dataset. Velox owns the object; never free it or depend on records surviving another action execution.
- The mutable dataset and cursor are not thread-safe. Do not hand the reference to asynchronous work or let nested code reposition it without an explicit contract.
Alias and naming cautions
Because DATA_ASNINL and DATA_ASNLine share object identity, a query, CreateData, Close, cursor move, filter or edit through either name immediately changes the other. Choose one name consistently within a script to make ownership and intent clear.
Additional Technical Info
DATA_ASNINL is an alternate inbound-ASN-line name for the current action's DATA_ASNLine object. It is a live TvxClientDataSet reference; the friendly name does not load data, choose a connection, execute SQL or impose a field layout.
Runtime binding and identity
Velox constructs the object with the action and binds DATA_ASNINL to TvxActionMan.FData22. It is the exact same object as DATA_ASNLine, not a copy or linked view.
The dataset begins inactive and without fields. CreateData, the Data query helpers and load methods can each replace its current schema/records. All scripts using this action see the same live cursor, filters, indexes and edits until the dataset is closed or repopulated.
Related entries
Datasetsexplains cursor, field, edit and ownership rules.CreateDatacreates an explicit in-memory schema.GetDataandGetDataFromDBexplicitly populate a dataset.TvxClientDataSetis the exposed class.DATA_ASNLineis the primary friendly name for this object.DATA_ASNis a different header object.
External references
- Embarcadero DocWiki:
TClientDataSetdocuments the inherited Delphi in-memory dataset. - Embarcadero DocWiki:
TDataSetdocuments the inherited cursor/edit model. - Free Pascal:
TDataSetprovides compatibility context; Velox uses Delphi and its own descendant.