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 - dynclose() close a dynamic database http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 dynclose()          Close a dynamic database
------------------------------------------------------------------------------
 Declaration
   database.hdr

 Syntax
   proc dynclose extern
   param value _PALIAS pAlias

 Arguments
   pAlias is the dynamic alias to close.

 Return
   None.

 Description
   The dynclose() function is for use with dynamic aliases allocated
   from the runtime heap. The database to which the pAlias parameter refers
   must have been opened with the dynopen() function. The call to dynclose()
   closes the database and associated indexes, and free the memory allocated
   to the dynamic alias. The call invalidates the alias that must not be
   subsequently used.

 Example
   #define EXAMPLE_DATABASE
   #define _DYNALIAS_
   #define _ALIASPTR_
   #include example.hdr

   proc Test_dynclose
   vardef
      _PALIAS pAlias
   enddef
   pAlias := dynopen( 0, "stest.dbf", DO_SHARED ) // open database
   ? reccount()
   append blank                                   // add a record
   ? reccount()
   dynclose( pAlias )                             // close database
   endproc

   proc main
   Test_dynclose()
   endproc

See Also: dynopen()

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