<cfx_kmQuery> cfx_kmSuite
Programming Reference

cfx_kmQuery contains functions related to CF queries, data import, export, etc.

DbfColumnList
DbfToQuery
Help
QueryToDbf
Version


F=DbfColumnList

Description
Build a list containing the column names of a standard DBF table.
Returns
The list of column names.
Syntax
  <cfx_kmQuery  F=DbfColumnList  V=variable  SHOW
      FILE=dbf-pathname >
Attribute   Description         Required?
FILE  Pathname of the input DBF table. The DBF must exist and be available for non-exclusive, read-only operations.  YES


F=DbfToQuery

Create a ColdFusion query and load it with the contents of a standard DBF table.

Returns
The number of records read into the query.
Syntax
  <cfx_kmQuery  F=DbfToQuery  V=variable  SHOW
      FILE=dbf-pathname
      QUERY=queryname
      FIELDS=list
      STARTROW=number
      ENDROW=number
      INDEX=index-name
      FILTER=expression >
Attribute   Description         Required?
FILE  Pathname of the input DBF table. The DBF must exist and be available for non-exclusive, read-only operations.  YES
QUERY  The name of the ColdFusion query to create. If a name is NOT specified, the query name "DbfToQuery" is used.
 no
FIELDS  Optional, comma-separated list of field names. If a field name list IS specified, only those fields are read from the DBF. Otherwise all DBF fields are read.  no
STARTROW  The starting row number to be read from the DBF. The default is to start at row #1, the first row.  no
ENDROW  The last row number to be read from the DBF. The default is to end at the last existing row.  no
FILTER  Not yet implemented.  no
INDEX  Optional name of the index (in the DBF production index) used to sort the DBF records as they are read. Default is no index/record sorting.  no


F=QueryToDbf

Append the contents of a ColdFusion query to a new or existing DBF table.

Returns
The number of records appended to the DBF.
Syntax
  <cfx_kmQuery  F=QueryToDbf  V=variable  SHOW
      QUERY=queryname
      FILE=dbf-pathname
      FIELDS=list
      STARTROW=number
      ENDROW=number
      APPEND >
Attribute   Description         Required?
QUERY  The name of an existing ColdFusion query.

Current query limitations:
    The query may have no more than 250 columns.
    The first 10 characters of each column name must be unique.
 YES
FILE  Pathname of the output DBF table. If the DBF does NOT exist, it is created. If the DBF DOES exist, it will be erased and rebuilt UNLESS the APPEND attribute is specified. If the DBF DOES exist, it must be available for exclusive, read-write file access. Based on the DBF index type (.cdx, .mdx, .ndx, etc.) at attempt is made to use the proper table locking protocol. (i.e. FoxPro, dBase or Clipper)  YES
FIELDS  Optional, comma-separated list of field names. If a field name list IS specified, only those fields are read from the query. Otherwise all query fields are read. Due to dBase file limitations, field names longer than 10 characters are truncated to 10. If you are attempting to APPEND to an existing DBF, all field names must match those of the DBF.  no
STARTROW  The starting row number to be read from the query. The default is to start at row #1, the first row.  no
ENDROW  The last row number to be read from the query. The default is to end at the last existing row.  no
APPEND  By default, QueryToDbf builds a new DBF table before writing the query records. If the APPEND attribute is specified AND if the DBF table already exists, the query records will be appended to the end of the existing table.  no