Object Table – Locked Missing

At our shop, we were doing a real big upgrade – Classic NAV (no SQL) all the way up to 2018. We hit a weird error message about the Locked and Locked By fields missing when trying to modify any records:

Since our upgrade lead hadn’t seen “Invalid column name ‘Locked'” before, and neither had I, this was a new one.

When he looked at the Object table in SQL, the fields were named “Låst” and “Låst av”, the Swedish translations of the field names. But, we know the ETX/STX files were correct during the upgrade, so it’s pretty baffling.

Opening the Classic, we’d get this:

Obviously, yes, “The Locked field on the Object table” does not exist.

Collation was fine, so how to fix it without restarting the upgrade?

Turns out, the go-to place was the good ol’ $ndo$dbproperty table. It has a field called Identifiers which normally contains something like:

2000000001=”Object”,1=”Type”,2=”Company Name”,3=”ID”,4=”Name”,5=”Modified”,6=”Compiled”,7=”BLOB Reference”,8=”BLOB Size”,9=”DBM Table No_”,10=”Date”,11=”Time”,12=”Version List”,40=”Locked”,50=”Locked By”

We were able to fix our customer’s strange situation by doing what you shouldn’t:

  • Shut-down all connections
  • We renamed the fields on the Object table
  • We updated the Identifiers to have the right field names
  • Started everything back up.

All ok. So, nothing amazing to share in this one and pretty rare, but if it you get it, hopefully this blog post existing saves you from an Upgrade Midnight Panic.