Antonio,
I just sent an email to Mr. Rao asking him
Antonio,
I just sent an email to Mr. Rao asking him
New adordd version with working locking as dbfs at https://github.com/AHFERREIRA/adordd.git
This is still on trial and its working quite well on heavy transactions many records in many tables.
It assures completely record locking and concurrent access control like any other rdd.
The drawback is that we must use a dbf table in a network share with another rdd for this to work.
Its very small recsize only 50b and has a recycle scheme for records not needed.
Still have some issues with dates and NULL values in adordd.
Antonio,
Any news regarding date functions?
Now Im taking care of :
copy to (cfile) WHILE ....
This function calls ADO_APPEND but the nWA received its a new one.
Probably this function selects a new area to copy file to.
Can we somehow change it or do we have to write a replacement from scratch.
Where can I find this function?
#pragma BEGINDUMP
#include <windows.h>
#include <hbapi.h>
HB_FUNC( FW_TTOD )
{
hb_retdl( hb_pardl( 1 ) );
}
HB_FUNC( FW_DTOT )
{
#ifdef __XHARBOUR__
hb_retdtl( hb_pardl( 1 ), hb_part( 1 ) );
#else
long lJulian;
long lMilliSecs;
hb_partdt( &lJulian, &lMilliSecs, 1 );
hb_rettdt( lJulian, lMilliSecs );
#endif
}
#pragma ENDDUMP(calias)->(__dblocate( {|| namefiled->name = cNname} ))1) Fields N without any decimal returning 2 decimals. (xxx.00) Do you have any idea what might be the problem.
2) Locates. Can you check the adordd.prg ado_locate to see what might be the problem?
Antonio Linares wrote:Antonio,
2) Locates. Can you check the adordd.prg ado_locate to see what might be the problem?
Surely you need to do a oRecordSet:GoTop() before running the locate code.
<Scope>
This option defines the number of records to scan. It defaults to ALL. The NEXT <nCount> scope scans the next <nCount> records, while REST scans records beginning from the current record to the end of file. The search begins with the first record unless a scope is defined.
STATIC FUNCTION ADO_LOCATE( nWA, lContinue )
LOCAL aWAData := USRRDD_AREADATA( nWA )
LOCAL oRecordSet := aWAData[ WA_RECORDSET ]
IF ADOEMPTYSET(oRecordSet)
RETURN HB_FAILURE
ENDIF
IF !lContinue
oRecordSet:MoveFirst() //START FROM BEGINING
ELSE
oRecordSet:MoveNext() //WE DONT WANT TO FIND THIS ONE AGAIN
ENDIF
CURSORWAIT()
DO WHILE !oRecordSet:EoF()
[b]IF EVAL( aWAData[ WA_SCOPEINFO ][ UR_SI_BFOR ])[/b]
aWAData[ WA_FOUND ] := .T.
EXIT
ENDIF
oRecordSet:MoveNext()
SYSREFRESH()
ENDDO
CURSORARROW()
aWAData[ WA_FOUND ] := ! oRecordSet:EOF
aWAData[ WA_EOF ] := oRecordSet:EOF
RETURN HB_SUCCESSAntonio Linares wrote:Antonio,
1) Fields N without any decimal returning 2 decimals. (xxx.00) Do you have any idea what might be the problem.
Do you use any C code ? if yes then check if hb_retnd() is used somewhere and change it into hb_retnl()
Antonio,
Try this:
(calias)->(__dblocate( {|| MsgInfo( namefiled->name, cNname ), namefiled->name = cNname} ))
And check what it shows
> Fields N without any decimal returning 2 decimals. (xxx.00)
Try to check the size of the field and use int() when its not a decimal
Try to check the size of the field and use int() when its not a decimal
nLen := Max( 19, oField:Precision + 2 ) nLen := Min( 19, oField:Precision ) //(calias)->(__dblocate( {|| MsgInfo( namefiled->name, cNname ), namefiled->name = cNname} ))
And check what it shows
AHF wrote:Antonio, Mr Rao,
Try to check the size of the field and use int() when its not a decimal
Solved!
In adofuncs.prg you have:
nLen   :=  Max( 19, oField:Precision + 2 )
Shouldnt it be:
nLen   := Min( 19, oField:Precision  )  //
Otherwise we will have all fields much bigger because the minimum it will be 19.
Why not only oField:Precision?
+2 is for ( 1 decimal place and 1 minus sign )
Antonio,
Money must be used with 2 decimals because there is a bug with Access.