home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 16 / CD_ASCQ_16_0994.iso / news / 4611 / fw16d.ins / SAMPLES / TESTDBF.PRG < prev    next >
Text File  |  1994-05-15  |  805b  |  32 lines

  1. // This is a prototype. Not functional yet!
  2.  
  3. #include "FiveWin.ch"
  4.  
  5. //----------------------------------------------------------------------------//
  6.  
  7. function Main()
  8.  
  9.    local oDbf, oRecord
  10.  
  11.    DBF oDbf FILENAME Test.dbf
  12.       FIELD Name   AS CHARACTER LEN 30
  13.       FIELD Age    AS NUMERIC   LEN  2
  14.       FIELD Phone  AS CHARACTER LEN 15
  15.       FIELD Active AS LOGICAL
  16.    ENDDBF
  17.  
  18.    oDbf:Use()          // It calls automatically oDbf:Create() if necessary
  19.                        // If DBF structure don't match Object, it warnings!
  20.  
  21.    DEFINE RECORD oRecord FROM oDbf
  22.  
  23.  
  24.    @ 2, 2 FIELDGET oRecord:Name
  25.    @ 3, 2 GET oRecord:Age
  26.    @ 4, 2 GET oRecord:Phone
  27.    @ 5, 2 GET oRecord:Active
  28.  
  29. return
  30.  
  31. //----------------------------------------------------------------------------//
  32.