Fix bug where WriteDataRow clears out errors

before the service returns.
This commit is contained in:
Infineon\Mitchem
2025-08-21 13:12:04 -07:00
parent 722bc63bdb
commit 05340fc53a

View File

@ -910,6 +910,7 @@ end service
//----------------------------------------------------------------------------------------------------------------------
Service WriteDataRow(TableName, KeyID, DataRow, IgnoreSelfLock, IgnoreMFSRoutines, IgnoreAllLocks)
ErrorMsg = ''
If TableName NE '' AND KeyID NE '' then
If IgnoreSelfLock NE True$ then IgnoreSelfLock = False$
If IgnoreMFSRoutines NE True$ then IgnoreMFSRoutines = False$
@ -943,7 +944,13 @@ Service WriteDataRow(TableName, KeyID, DataRow, IgnoreSelfLock, IgnoreMFSRoutine
end
end
If IgnoreAllLocks EQ False$ then
If Error_Services('HasError') then
ErrorMsg = Error_Services('GetMessage')
end
Database_Services('ReleaseKeyIDLock', TableName, KeyID)
If ErrorMsg NE '' then
Error_Services('Add', ErrorMsg)
end
end
end else
Error_Services('Add', 'Unable to lock ' : KeyID : ' for the ' : TableName : ' table in the ' : Service : ' service.')
@ -1102,3 +1109,4 @@ end service
// Internal GoSubs
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////