Menu

Comilation Error

Help
TGK
2007-12-13
2013-04-11
  • TGK

    TGK - 2007-12-13

    Created the website and ran the three setup SQL scripts.
    First time into the application I get this compilation error:

    Compiler Error Message: CS0019: Operator '+' cannot be applied to operands of type 'System.DateTime' and 'int'
    Source File: c:\Inetpub\websites\TimeRep\App_Code\Db.cs    Line: 174

    At line 174 of

    Line 172:        {
    Line 173:            oDs = SqlQuery(string.Format("SELECT A.TimeId, CONVERT(VARCHAR, A.DateVal, 106) AS DateVal, DAY(A.DateVal) AS DayNo, dbo.GetDayName(A.DateVal, 1) AS DayName, D.ProjectName, C.TaskName, A.JobRef, A.Comment, B.StatusText, A.Hours FROM tblTime AS A (NOLOCK) INNER JOIN tblStatus AS B ON B.StatusId = A.StatusId INNER JOIN tblTasks AS C ON C.TaskId = A.TaskId INNER JOIN tblProjects AS D ON D.ProjectId = A.ProjectId WHERE (A.DateVal >= '{1}') AND (A.DateVal < '{2}') AND (A.UserId = {0}) ORDER BY DateVal, ProjectName, TaskName, StatusText",
    Line 174:                UserId, StartDate.ToLongDateString(), (EndDate + 1).ToLongDateString()));
    Line 175:        }
    Line 176:

     
    • TGK

      TGK - 2007-12-13

      Was able to fix by changing EndDate to EndDate.AddDays(1).

      Next compilation error:
      I was able to login to the administrator and configure.
      However when I tried to do any administration I get an error indicating that there are not in the IListSource when the DataBind() method is called.

      TK

       
    • AndrewM

      AndrewM - 2007-12-13

      Thanks for that - I will look into this ASAP.

      And sorry it took me so long to respond. I was expecting SourceForge to send me an email if/when anything changed but I obviously haven't set that up correctly (I'm new to managing a project on SourceForge in case it wasn't noticed).

      Andrew

       
    • AndrewM

      AndrewM - 2007-12-22

      I believe I have fixed both of the above problems in release 102.

      Andrew

       
    • Maikel Steen

      Maikel Steen - 2008-07-08

      i still get the same errors even with 102

       
  • asp3278

    asp3278 - 2011-04-29

    I downloaded the code and executed the code I am also getting the same error IListSource when the DataBind() method is called.

     

Log in to post a comment.

MongoDB Logo MongoDB