Fix for CH12 LoadTimeSheet()
So, after troubleshooting the this problem for a while I found that the problem is that the GroupProjects information in the application is not persistent, i.e. never gets loaded into the GroupProjects table. Unfortunately, this is the same table which the InsertTimeSheet Stored Procedure uses to populate the TimeSheetItems table. While, not the original intent of the logical flow of the program, the following fix will allow one to test the functionallity of the program. It effetively grabs project information from the Project table instead of the GroupProjects table allowing you to test the functionality.
Change the following line in the usp_InsertTimeSheet Stored Procedure
Declare Project_Cursor CURSOR FOR SELECT ProjectID
FROM GroupProjects WHERE GroupID = @GroupID
Declare Project_Cursor CURSOR FOR SELECT ProjectID FROM Projects
CURSOR Project_Cusor IS SELECT ProjectID FROM GroupProjects WHERE GroupID = varGroupID;
CUSROR Project_Cursor IS SELECT ProjectID FROM Projects;
Again, this does not meet the intent of the flow of the program, fixing that would require quite a bit more code, but it will at least allow anyone stuck at this point to move forware with the example code.