src-db/database/model/functions/MA_MAINTENANCE_SCHEDULE.xml
changeset 799 fef2c5e2feb7
parent 756 ae11e4610537
child 1178 9d1c8b3fd305
--- a/src-db/database/model/functions/MA_MAINTENANCE_SCHEDULE.xml	Wed Apr 30 10:48:47 2008 +0000
+++ b/src-db/database/model/functions/MA_MAINTENANCE_SCHEDULE.xml	Mon May 05 06:59:24 2008 +0000
@@ -61,6 +61,7 @@
     v_MA_Maint_Scheduled NUMBER;
     v_Maint MA_Maintenance%ROWTYPE;
     v_InitDay NUMBER;
+    v_DBA_ErrorLog_ID NUMBER;
   BEGIN
     IF(p_PInstance_ID IS NOT NULL) THEN
       --  Update AD_PInstance
@@ -555,6 +556,7 @@
     DECLARE
       v_Code NUMBER:=SQLCODE;
     BEGIN
+      AD_SEQUENCE_NEXT('DBA_ERRORLOG', v_Client_ID, v_DBA_ErrorLog_ID);
       INSERT
       INTO DBA_ERRORLOG
         (
@@ -564,7 +566,7 @@
         )
         VALUES
         (
-          DBA_ErrorLog_Seq.NEXTVAL, now(),
+          v_DBA_ErrorLog_ID, now(),
           v_Code, v_ResultStr,
            'A_Asset_Post'
         )