Gentee Programming Language > Documentation > Libraries Download documentation

Working with DBF files

This library is used to work with dbf files. The formats dBase III and dBase IV are supported. To be able to work, you should describe a variable of the dbf type. For using this library, it is required to specify the file dbf.ge (from Lib subfolder) with include command.

  • Operations
  • Methods
  • Methods for working with fields

    Operations

    Operations defined for the variable of dbf type are listed below. The second column contains possible statements where typename is a variable or an expression of the specified type.
     
    OperationSyntaxReturn typeComments
    ** dbfuintGet the number of records in the database.
    foreachLooking through all records with the help of the foreach operator. The current record is different for each iteration.

    foreach cur,base 
    // cur - number of the current record 
    { 
       ... 
    }

    Methods

    dbf.appendAdding a record
    dbf.bofFirst record check
    dbf.bottomLast record check
    dbf.closeClosing a database
    dbf.createCreating a database
    dbf.delSettings clearing the deletion mark
    dbf.emptyCreating an empty copy
    dbf.eofChecking if a record is defined in the database
    dbf.geterrorGetting an error code
    dbf.goMoving to a record
    dbf.isdelGetting the record deletion mark
    dbf.openOpening a database
    dbf.packPacking a database
    dbf.recnoGetting the number of the current record
    dbf.skipMoving to another record
    dbf.topMoving to the first record

    Methods for working with fields

    dbf.f_countNumber of fields
    dbf.f_dateGetting a date
    dbf.f_decimalGetting the size of the fractional part in a numerical field
    dbf.f_doubleGetting a numerical value
    dbf.f_findGetting the number of a field by its name
    dbf.f_intGetting the value in the form of a number
    dbf.f_logicGetting a logical value
    dbf.f_memoGet the value of a memo field
    dbf.f_nameField name
    dbf.f_offsetField offset
    dbf.f_ptrPointer to data
    dbf.f_strGetting a value
    dbf.f_typeField type
    dbf.f_widthField size
    dbf.fw_dateWriting a date
    dbf.fw_doubleWriting a numerical value
    dbf.fw_intWriting a numerical value
    dbf.fw_logicWriting a logical value
    dbf.fw_memoWriting a value into a memo field
    dbf.fw_strWriting a value


     Copyright © 2004-2006 Gentee Inc. All rights reserved.