I have a customer who has a large number of Item Vendors and Purchase Prices which are updated on a daily basis, based upon files received daily from the vendors. Instead of storing this in NAV, then we wanted to keep this out of NAV, as it otherwise would require a very large number of system updates every day. So instead we created a view (linked object) to the data in it’s SQL Server database. When using the view, then it runs fine. When using a simple function to test the new “table”, then it works fine.
But I’m getting this error:
The following SQL Server error or errors occurred when accessing the Item Vendor table:
3910,“42000”,[Microsoft][ODBC SQL Server Driver][SQL Server]Transaction context in use by another session.
whenever I’m trying to run the update order promising function’s (AvailablitityManagement CU 99000889). The code that gives the problem is located in the Requisition Line table:
IF (Type = Type::Item) AND ("No." <> '') AND ("Prod. Order No." = '') THEN BEGIN
IF ItemVend.GET("Vendor No.","No.") THEN BEGIN
"Vendor Item No." := ItemVend."Vendor Item No.";
UpdateOrderReceiptDate(ItemVend."Lead Time Calculation");
END;
GetDirectCost(FIELDNO("Vendor No."))
END;
The error occurs on the ItemVend.GET statement. And if I’m trying with the same parameters in a test codeunit, then it works fine here!
The client is running NAV 2009 R2 and SQL Server 2008.