Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - lupdate() return the date when a database was last updated http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 lupdate()           Return the date when a database was last updated
------------------------------------------------------------------------------
 Declaration
   database.hdr

 Syntax
   func date lupdate extern

 Arguments
   None.

 Return
   The date of last update.

 Description
   The lupdate() function returns the date when the currently selected
   database was last updated.

 Example
   #define EXAMPLE_DATABASE
   #include example.hdr

   // no field declarations because no any fields will be referenced
   dbfdef sTemp3
   enddef
   
   proc Test_lupdate
   vardef
      char cFileName
      char cAnswer
   enddef
   open sTest
   if lupdate() == today()
      ? "Entry has already occurred today..."
      accept "Backup database [Y/N]? " to cAnswer
      if cAnswer $ "Yy"
         ? "Backup database..."
      endif
   endif
   close sTest
   // copy all databases modified today to another disk
   if findfirst("*.dbf", FIND_ANYFILE )
      repeat
         cFileName := findfstr()
         open cFileName alias sTemp3
         if lupdate() == today()
            ? "Do backup for", cFileName // copy cFileName to "a:\" + cFileName
         endif
         close sTemp3
      until .not. findnext()
   endif
   endproc

   proc main
   Test_lupdate()
   endproc

See Also: alupdate()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson