Hello everyone
We are working with Microsoft Business Solutions-Navision 3.70.B and Microsoft SQL Server Option
Sometimes when the user opens the form 5708 Get Receipt Lines, there is a blockage that prevents SQL continue working.
Analyzing the lock from SQL Query Analyzer shows that spid and blk are equal, ie: SQL is being blocked by spid own.
The code formualario in 5708 to perform a function using a temporary table.
Is there any way to rewrite this code so that there are no locks in SQL?
IsFirstDocLine()
TempSalesShptLine.RESET;
TempSalesShptLine.COPYFILTERS(Rec);
TempSalesShptLine.SETRANGE(“Document No.”,“Document No.”);
IF NOT TempSalesShptLine.FIND(’-’) THEN BEGIN
SalesShptLine.COPYFILTERS(Rec);
SalesShptLine.SETRANGE(“Document No.”,“Document No.”);
SalesShptLine.FIND(’-’);
TempSalesShptLine := SalesShptLine;
TempSalesShptLine.INSERT;
END;
IF “Line No.” = TempSalesShptLine.“Line No.” THEN
EXIT(TRUE);