Home page  
Help >
ddlFindV() - isolate records in a collection (vectorized)
Version 7.11
ddlFindV() - isolate records in a collection (vectorized) ddlFindV() - isolate records in a collection (vectorized)

Prototype:
   void ddlFindV(
      CONTROL *ctl,
      char *OptnStr,
      char *ArgList,
      char *ValueVector[]);
Permitted values in OptnStr:
   /Cn - return first n values only
   /F  - enable field-to-field query
   /N  - force non-keyed query

Form of ArgList:
      <cx> [<TableName>] <expression>
Where: <cx> is the name of the collection
<TableName> is the ASCII name of the desired table in the database. If <TableName> is omitted, the global collection is used.
<expression> is a legal FIND expression. Any value in <expression> may be replaced by a token that indicates that a pointer to the value is in the next ValueVector[] entry. Variables are not permitted in ddlFindV() expressions.
The permissible tokens and their corresponding argument types are:
   %b - BYTE data field of proper length
   %nnnnb - BYTE data field of length nnnn
   %d - 16 bit int*
   %ld - 32 bit int*
   %lu - unsigned 32 bit int*
   %hd - 64 bit int*
   %hu - unsigned 64 bit int*
   %f - float (32 bit)*
   %lf - double (64 bit)*
   %s - char* (null terminated string)
            for BYTE datatype, string is in the form 0xnnnnnnn ...

Form of ValueVector[]
Each entry in the ValueVector[] array contains a (type-cast) pointer to the value of the corresponding token.

For example:

   {
      float x=123.00;
      double y=321.00;
      char *ValueList[2];
 
      ValueList[0] = (char*)&x;
      ValueList[1] = (char*)&y;
 
      ddlFindV(&ctl,"/","a where x = %f and y =%lf",ValueList);
   }
Description:
The ddlFindV() API function isolates the subset of interest into a specified collection. The <query-expression> determines the subset of interest.

If the <TableName> argument is specified, the function operates only on the specified table, and the specified part of the collection.

If the <TableName> argument is not specified, the function operates only on all tables, and the global collection.

The query value for a DATE field can be in either the default external format 'mm/dd/yyyy', 'mm-dd-yyyy' or 'mm.dd.yyyy'; or it can be in the system DATE format 'yyyymmdd'.
That is, the only valid forms for a date literal in ddlFind() are:
     'yyyymmdd'
     'mm/dd/yyyy' or 'mm/dd/yy'
     'mm-dd-yyyy' or 'mm-dd-yy'
     'mm.dd.yyyy' or 'mm.dd.yy'

The query value for a DATETIME field can be in either the default external format 'mm/dd/yyyy hh:nn:ss.ttt', 'mm-dd-yyyy hh:nn:ss.ttt' or 'mm.dd.yyyy hh:nn:ss.ttt'; or it can be in the system DATETIME format 'yyyymmddhhnnssttt'.

The query value for a DateTimeEx or TIME field must be in the default format as specified in the Default Templates section.

In all cases, the default template 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 ...

Refer to ddlFind() - additional details and examples for additional information.

Notes:
The parameterized forms for BYTE data type are:
      %s - with the corresponding string parameter in the form 0xnnnnnnn ...
      %b - with the corresponding byte parameter being the required size;
      %nnnnb - with the corresponding byte parameter being nnnn bytes;

Values returned in Control Structure:
Control.Ans1 Total number of records selected
Control.Ans2 If the /Cnnn option was used, this is the number of records selected before the /Cnnn limit was applied; else, it is a duplicate of Control.Ans1

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.