Skip to content

Incorrect default value for lLock parameter in dbAppend() documentation #357

@kamilprzyb2

Description

@kamilprzyb2

Hello,

I have found an error in the documentation for the dbAppend() function in Harbour.
The documentation currently states:

If lLock is passed a logical true (.T.) value, it will release the record locks, which allows the application to maintain multiple record locks during an appending operation. The default for this parameter is a logical false (.F.).

However, the source code for this function shows that the default value for the lLock parameter is actually true, not false.
Here is the relevant portion of the source code:

HB_FUNC( DBAPPEND )
{
   AREAP pArea = ( AREAP ) hb_rddGetCurrentWorkAreaPointer();

   if( pArea )
   {
      HB_BOOL bUnLockAll = hb_parldef( 1, HB_TRUE );
      HB_ERRCODE errCode;

      /* Clipper clears NETERR flag before APPEND */
      hb_rddSetNetErr( HB_FALSE );
      errCode = SELF_APPEND( pArea, bUnLockAll );
      hb_retl( errCode == HB_SUCCESS );
   }
   else
      hb_errRT_DBCMD( EG_NOTABLE, EDBCMD_NOTABLE, NULL, HB_ERR_FUNCNAME );
}

As you can see, the hb_parldef( 1, HB_TRUE ) line sets the default value for the lUnLockAll parameter to true.
Please update the documentation to reflect the correct default value for the parameter.
Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions