Table Buffering set to Buffermodeoverride = 5 for both Header and Detail table for Sale Invoice
Header Index set to Key_Pk Autoincrement I
Detail Index set to Key_Fk I
SELECT Header
Set Relation To Key_pk into Detail
Set Skip To Detail
thisform.pp_atincvh = GETAUTOINCVALUE()
SELECT Detail
lnatincvh = thisform.pp_atincvh
IF INDEXSEEK(lnatincvh,.T.,'Detail','Key_Fk')
ELSE
GO BOTTOM IN Detail
ENDIF
SCAN FOR Detail.KEY_FK = thisform.pp_atincvh
repl Qty with lnQty , Rate with lnRate , Amt with lnAmt
EndScan
When more than 1 user working on Sale Invoice above Loop speed become very slow
Above Scan Loop working absolutely Fast in Purchase Invoice ,Sale Return Invoice , Purchase Return Invoice in Multi user Environment Except <B>Sale Invoice</B>
Through Set coverage on tell the story that scan loop taking long time in Sale Invoice Check all the coding but found nothing that why scan loop taking time in Sale Invoice and same Scan Loop with same coding working fast in other type of Invoices.
Check all the setting but found nothing different
Header Index set to Key_Pk Autoincrement I
Detail Index set to Key_Fk I
SELECT Header
Set Relation To Key_pk into Detail
Set Skip To Detail
thisform.pp_atincvh = GETAUTOINCVALUE()
SELECT Detail
lnatincvh = thisform.pp_atincvh
IF INDEXSEEK(lnatincvh,.T.,'Detail','Key_Fk')
ELSE
GO BOTTOM IN Detail
ENDIF
SCAN FOR Detail.KEY_FK = thisform.pp_atincvh
repl Qty with lnQty , Rate with lnRate , Amt with lnAmt
EndScan
When more than 1 user working on Sale Invoice above Loop speed become very slow
Above Scan Loop working absolutely Fast in Purchase Invoice ,Sale Return Invoice , Purchase Return Invoice in Multi user Environment Except <B>Sale Invoice</B>
Through Set coverage on tell the story that scan loop taking long time in Sale Invoice Check all the coding but found nothing that why scan loop taking time in Sale Invoice and same Scan Loop with same coding working fast in other type of Invoices.
Check all the setting but found nothing different