Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- db_VISTA III - d_recfree http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
   D_RECFREE

SUMMARY
   d_recfree(REC[,dbn])
   int REC;
   int dbn;

ARGUMENTS
   REC         The record type for which  a read or exclusive lock is to be
               freed.

   dbn         (optional) The number of the database containing the record.

DESCRIPTION
   Function d_recfree frees the read or exclusively locked data and key files
   associates with record type REC. This function can only be executed outside
   of atransaction.Incide transaction,lock are freed by functions d_trend or
   d_trabort.If the record type is exclusively locked, all changed database
   pages in the cache are flushed.


   This function is present in the single-user version of db_VISTA, but
   performs no action. This allows multi-user applications to link with the
   single-user version for operation on stand-alone computers.

CURRENCY CHANGES
   None.

RETURN CODES

   -3     S_INVREC      Invalid record type specified. Perhaps you passed
                        a set or field type instead.

   -24    S_NOTLOCKED   Record type is not locked.

   -29    S_TRFREE      Attempt to free a read-lock inside a transaction.

EXAMPLE

    int count,stat=S_OKAY;
    ...
    /*list info record in id_code order*/
    while (stat == S_OKAY){
     d_reclock(INFO,"r");
     for(count=0;count<20 &&
          (stat=d_keynext(ID_CODE))==S_OKAY;++count){
          /*hold lock for only 20 record at a time */
          d_recread(&irec);
          pr_info();
     }
     d_recfree(INFO);
    }

See Also: d_freeall d_keyfree d_keylock d_keylstat d_lock

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