Incorrect default value for lLock parameter in dbAppend() documentation
Opened this issue · 1 comments
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.
You're right, except the public website documentation comes from another repo:
https://github.com/vszakats/hb/blob/main/doc/en/rdddb.txt
Here repository under doc/* lacks this file at all, i think it should be readded.