Home page  
Help >
ddlChange() - change records in a collection
Version 7.11
ddlChange() - change records in a collection ddlChange() - change records in a collection

Prototype:
   void ddlChange(
      CONTROL *ctl,
      char *OptnStr,
      char *ArgList);

Permitted values in OptnStr:
   /Cn - change the first n records of the collection only

Form of ArgList:
      <cx> [<TableName>] <field1> <op> <value1> ...
Where: <cx> is the name of the source collection
<TableName> is the ASCII name of the desired table in the database. If <TableName> is omitted, the global collection is used.
<field1> is the first field to be changed
<op> is "=", "TO" or "BY"
      the "=" and "TO" <op>s cause absolute reassignment to <value>
      the "BY" <op> causes incremental change by <value>
<value1> is a literal value or global variable to be assigned to <field1>

Description:
ddlChange() modifies the contents of existing data base records specified by the source collection. Only the fields specified in the list are modified.

The default format for the target value of a DATETIME field is the default template 'mm/dd/yyyy hh:nn:ss.ttt', 'mm-dd-yyyy hh:nn:ss.ttt' or 'mm.dd.yyyy hh:nn:ss.ttt'.

The default format for the target value of a DateTimeEx or TIME field is the default template as specified in the Default Templates section.

In all cases, the default template can be overridden with a format override; or it can be modified with the ddlMode() DATEFORM function.

The query value for a BYTE field is expressed as a hex character string in the form 0xnnnnnnn ...

Notes:
If the Change Callback is defined [Ref. ddlSetChangeCb()], the callback is called with each record image after the specified values have been stored but before the record has been rewritten.

Values returned in Control Structure:
Control.Ans1 Number of records changed
Control.Ans2 Number of records read

Copyright © 2019 , WhamTech, Inc.  All rights reserved. This document is provided for information purposes only and the contents hereof are subject to change without notice. Names may be trademarks of their respective owners.