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 - __soft_link database structure verification setting http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 __soft_link         Database structure verification setting
------------------------------------------------------------------------------
 Declaration
   database.hdr

 Syntax
   logical __soft_link

 Default
   .f. (non-matching database structure generates error).

 Description
   The __soft_link system variable controls the treatment of structural
   differences between declared aliases and databases opened with them.
   If a database header structure does not exactly match the dbfdef
   definition, a runtime error will be issued. If this variable is set to
   .t., such errors will not be generated.

 Example
   #define EXAMPLE_DATABASE
   #include example.hdr

   dbfdef sPartial
      char( 15 ) lastname
      uint( 2 )  whatever
   enddef
   
   proc Test_soft_link
   __soft_link := .t.                // switch off error generation
   open "stest.dbf" alias sPartial   // open database using wrong alias
   ? sPartial->lastname              // show field contents
   close sPartial                    // close database
   __soft_link := .f.                // switch off error generation
   wait "Press a key to generate runtime error " ;
      "due to database structure mismatch"
   open "stest.dbf" alias sPartial   // reopen database and get the error
   endproc

   proc main
   Test_soft_link()
   endproc

See Also: dbfdef

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