diff --git a/LSL2/STPROC/DATABASE_SERVICES.txt b/LSL2/STPROC/DATABASE_SERVICES.txt index a10baf6..6b226eb 100644 --- a/LSL2/STPROC/DATABASE_SERVICES.txt +++ b/LSL2/STPROC/DATABASE_SERVICES.txt @@ -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 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +