FT Database

 FT_DBFHAND()     Obtain the handle associated with an open .DBF file.
 FT_DBTHAND()     Obtain the handle associated with an open .DBT file.
 FT_FDEC()        Return the number of decimals in a numeric (type "N") field.
 FT_FEMPTY()      Determine if a field is empty, i.e., contains no value.
 FT_FEXIST()      Check for the existence of a field.
 FT_FLEN()        Return a field's length.
 FT_FNUM()        Return a field's ordinal position given the field name.
 FT_FPLACE()      Write a new value to a field.
 FT_FTYPE()       Return a field's type, given field name or ordinal position
 FT_FVAL()        Return the value of a field.
 FT_FVALLEN()     Return the length of the value in a field.
 FT_NTXHAND()     Obtain the handle associated with an open .NTX file.

 

FT_FVALLEN

FT_FVALLEN()
 Return the length of the value in a field.

 Syntax

      FT_FVALLEN( <xVar> ) -> nVlen

 Arguments

      <xVar> is either a field name or ordinal .DBF position.

 Returns

      the length of the value in a specified field.  -1 if error.

 Description

      FT_FVALLEN() reports the length of the value in any .DBF field.

 Examples

      nVallen:= FT_FVALLEN("unit_prc")
      nVallen:= FT_FVALLEN( 2 )
      - or -
      nNum:=    FT_FNUM( "unit_prc" )
      nVallen:= FT_FVALLEN( nNum )

 Source: FIELD.PRG

See Also: FT_FPLACE() FT_FLEN() FT_FDEC() FT_FNUM() FT_FTYPE() FT_FVAL()

 

FT_FVAL

FT_FVAL()
 Return the value of a field.

 Syntax

       FT_FVAL( <xVar> ) -> xVal

 Arguments

     <xVar> is either a field name or ordinal .DBF position.

 Returns

     value (contents) of the specified field.  NIL, if error.

 Description

     FT_FVAL() reports the value (contents) of any .DBF field.

 Examples

     xVal:= FT_FVAL( "unit_prc" )
     xVal:= FT_FVAL( 2 )
     - or -
     nNum:= FT_FNUM( "unit_prc" )
     xVal:= FT_FVAL( nNum )

 Source: FIELD.PRG

See Also: FT_FPLACE() FT_FVALLEN() FT_FLEN() FT_FDEC() FT_FNUM() FT_FTYPE()

 

FT_FTYPE

FT_FTYPE()
 Return a field's type, given field name or ordinal position

 Syntax

      FT_FTYPE( <xVar> ) -> cType

 Arguments

     <xVar> is either a field name or ordinal .DBF position.

 Returns

     the type of field: character (C), numeric (N), date (D), logical (L),
     or memo (M).  "U", if NIL.

 Description

     FT_FTYPE() reports the type ("C","N","D","L","M") of any .DBF field.

 Examples

     cType:= FT_FTYPE( "unit_prc" )
     cType:= FT_FTYPE( 2 )
     - or -
     nNum:=  FT_FNUM( "unit_prc" )
     cType:= FT_FTYPE( nNum )

 Source: FIELD.PRG

See Also: FT_FPLACE() FT_FVALLEN() FT_FLEN() FT_FDEC() FT_FNUM() FT_FVAL()

 

FT_FPLACE

FT_FPLACE()
 Write a new value to a field.

 Syntax

      FT_FPLACE( <xVar>, <xVal> ) -> xVal

 Arguments

     <xVar> is either a field name or ordinal .DBF position.

 Returns

     <xVal>, the FT_FPLACE()d value.  NIL if error.

 Description

     FT_FPLACE() writes a new value to a specified field of *ANY*
     Clipper-valid type.  In conjunction with the FIELDPLACE UDC
     (in FT_FIELD.CH), it constitutes a fully capable alternative to
     REPLACE.

 Examples

     xVal:= FT_FPLACE( "unit_prc", 15.73 )
     xVal:= FT_FPLACE( 2, 15.73 )
     - or -
     nNum:= FT_FNUM( "unit_prc" )
     xVal:= FT_FPLACE( nNum,15.73 )

 Source: FIELD.PRG

See Also: FT_FVALLEN() FT_FLEN() FT_FDEC() FT_FNUM() FT_FTYPE() FT_FVAL()



FT_FNUM

FT_FNUM()
 Return a field's ordinal position given the field name.

 Syntax

      FT_FNUM( <cVar> ) -> nNum

 Arguments

     <cVar> must be a valid field name.

 Returns

     the ordinal position of the field.  0, if a non-character value is
     passed or field <xVar> does not exist.

 Description

     In 5.01, FT_FNUM() was superseded by FieldPos().  Included here for
     those who already coded FT_FNUM() calls.

 Examples

     nNum:= FT_FNUM( "unit_prc" )

 Source: FIELD.PRG

See Also: FT_FPLACE() FT_FVALLEN() FT_FLEN() FT_FDEC() FT_FTYPE() FT_FVAL()



FT_FLEN

FT_FLEN()
 Return a field's length.

 Syntax

      FT_FLEN( <xVar> ) -> nLen

 Arguments

     <xVar> is either a field name or ordinal .DBF position.

 Returns

     the length of the specified field.  -1 if error.

 Description

     FT_FLEN() reports the length of any .DBF field.

 Examples

     nLen:= FT_FLEN("unit_prc")
     nLen:= FT_FLEN( 2 )
     - or -
     nNum:= FT_FNUM( "unit_prc" )
     nLen:= FT_FLEN( nNum )

 Source: FIELD.PRG

See Also: FT_FPLACE() FT_FVALLEN() FT_FDEC() FT_FNUM() FT_FTYPE() FT_FVAL()



FT_FEXIST

FT_FEXIST()
 Check for the existence of a field.

 Syntax

      FT_FEXIST( <xVar>, <xVal> ) -> lVal

 Arguments

     <xVar> may be either a field name or ordinal .DBF position.

 Returns

     <lVal>, a logical indicating a field's existence or lack thereof.

 Description

     FT_FEXIST() enables existence checking before proceeding with
     other operations.

 Examples

     lExi:= FT_FEXIST( "unit_prc" )
     lExi:= FT_FEXIST( 2 )
     - or -
     nNum:= FT_FNUM( "unit_prc" )
     lExi:= FT_FEXIST( nNum )

 Source: FIELD.PRG

See Also: FT_FVALLEN() FT_FLEN() FT_FDEC() FT_FNUM() FT_FTYPE() FT_FVAL()

 

FT_FEMPTY

FT_FEMPTY()
 Determine if a field is empty, i.e., contains no value.

 Syntax

      FT_FEMPTY( <xVar> ) -> lVal

 Arguments

     <xVar> may be either a field name or ordinal .DBF position.

 Returns

     <lVal>, a logical indicating if field <xVar> is empty.

 Description

     FT_FEMPTY() checks for the existence of a value in a field.

 Examples

     lEmp:= FT_FEMPTY( "unit_prc" )
     lEmp:= FT_FEMPTY( 2 )
     - or -
     nNum:= FT_FNUM( "unit_prc" )
     lEmp:= FT_FEMPTY( nNum )

 Source: FIELD.PRG

FT_FDEC

FT_FDEC()
 Return the number of decimals in a numeric (type "N") field.

 Syntax

      FT_FDEC( <xVar> ) -> nDec

 Arguments

     <xVar> is either a field name or ordinal .DBF position.

 Returns

     the number of decimal places in a numeric field.  -1 if field is
     not type "N", or if other error.

 Description

     FT_FDEC() reports the number of decimal places in a numeric field.

 Examples

     nDec:= FT_FDEC( "unit_prc" )
     nDec:= FT_FDEC( 2 )
     - or -
     nNum:= FT_FNUM( "unit_prc" )
     nDec:= FT_FDEC( nNum )

 Source: FIELD.PRG

See Also: FT_FPLACE() FT_FVALLEN() FT_FLEN() FT_FNUM() FT_FTYPE() FT_FVAL()