Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- The Guide To Clipper - <b>db_error(name, line, info) database error</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Db_error(name, line, info)        Database error

   Database errors occur when an action is taken that affects a database
   file between the time it is USEd and CLOSEd.  This includes
   operations such as APPEND BLANK or REPLACE.


Info messages: Database required
               Lock required
               Exclusive required
               Field numeric overflow
               Index file corrupted

Recovery:      RETURN (.T.) retries database operation
               RETURN (.F.) and Clipper automatically QUITs (CLOSEs ALL)


------------------------- Example -- Errorsys.prg ----------------------------

  FUNCTION db_error
  PARAM name, line, info

  SET DEVICE TO SCREEN
  @ 0, 0
  @ 0, 0 SAY "Proc " + M->name + " line " + LTRIM(STR(M->line)) +;
         ", " + M->info

  NOTE BREAK

  QUIT

  RETURN .F.


------------------------- Example -- Alterror.prg -----------------------------

  FUNCTION db_error
  PARAM name, line, info

  ALTD(2)

  SET DEVICE TO SCREEN
  @ 0, 0
  @ 0, 0 SAY "Proc " + M->name + " line " + LTRIM(STR(M->line)) +;
         ", " + M->info

  BREAK

  RETURN .F.

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