Error message when running the Copy Scheduling Results to SEC & MST process
Error:: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object. at AeriesLib.SSS_Record.Save(Boolean DoNotLog, Boolean DoNotUpdateSMSTotals) in D:\a\1\s\Src\AeriesLib\Tables\Student Related\SSS_Table.vb:line 394 at LongRunningProcesses.StudentSchedulingFunctions.CopyREQ(String USR, String ConnectionString, String SC, String strTrack, Boolean Year, Boolean Spring, Boolean Fall, Boolean Qtr1, Boolean Qtr2, Boolean Qtr3, Boolean Qtr4, Boolean DoPrescheduled) in D:\a\1\s\Src\LongRunningProcesses\StudentSchedulingFunctions.vb:line 133 at LongRunningProcesses.StudentSchedulingFunctions.InitializeScheduling(StudentSchedulingFunctions_InitializeScheduling_Options opt) in D:\a\1\s\Src\LongRunningProcesses\StudentSchedulingFunctions.vb:line 1202 --- End of inner exception stack trace --- at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at AeriesReporting.LongRunningProcess.InternalRunProcess(LongRunningProcessOptions lrpOptions) in D:\a\1\s\Src\AeriesReporting\LongRunningProcess Processing\LongRunningProcess.vb:line 316 at AeriesReporting.LongRunningProcess.Run(ReportingMessage& msg) in D:\a\1\s\Src\AeriesReporting\LongRunningProcess Processing\LongRunningProcess.vb:line 143
Cause
Orphaned Classes (SEC) records (not attached to a STU record)
Resolution
Delete orphaned SEC records
Identify Classes (SEC) records without a STU record:
SELECT STU.SC, STU.SN, STU.ID, STU.TG, STU.DEL, SEC.* FROM STU INNER JOIN (SELECT * FROM SEC WHERE DEL = 0) SEC ON STU.SC = SEC.SC AND STU.SN = SEC.SN WHERE STU.DEL = 1
Update SEC.DEL to 1
UPDATE SEC SET SEC.DEL = 1 INNER JOIN (SELECT * FROM SEC WHERE DEL = 0) SEC ON STU.SC = SEC.SC AND STU.SN = SEC.SN WHERE STU.DEL = 1