Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Time Sheet

Time Sheet

Scheduled Pinned Locked Moved ASP.NET
databasetutorialquestion
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Anjani Poornima
    wrote on last edited by
    #1

    Hi, I am developing Time Sheet where the user selects the date from asp calender so that seven days will be displayed and the no.of.hours worked will be entered Here my question is how to save the hours worked into the database. In my databse there are columns from day1 to day31. I like to save the hours entered into the corresponding day of database as same the days i entered in the front end. Suppose if i enetered 8hours for day 27 i like to save 8 in day27 of database. Please suggest me how i can do this.... Thanks & Regards Anjani

    S S N 3 Replies Last reply
    0
    • A Anjani Poornima

      Hi, I am developing Time Sheet where the user selects the date from asp calender so that seven days will be displayed and the no.of.hours worked will be entered Here my question is how to save the hours worked into the database. In my databse there are columns from day1 to day31. I like to save the hours entered into the corresponding day of database as same the days i entered in the front end. Suppose if i enetered 8hours for day 27 i like to save 8 in day27 of database. Please suggest me how i can do this.... Thanks & Regards Anjani

      S Offline
      S Offline
      Sneha Bisht
      wrote on last edited by
      #2

      So whats the problem, just update table in database Update [tablename] set D27(your column name)=8 where [condition]

      1 Reply Last reply
      0
      • A Anjani Poornima

        Hi, I am developing Time Sheet where the user selects the date from asp calender so that seven days will be displayed and the no.of.hours worked will be entered Here my question is how to save the hours worked into the database. In my databse there are columns from day1 to day31. I like to save the hours entered into the corresponding day of database as same the days i entered in the front end. Suppose if i enetered 8hours for day 27 i like to save 8 in day27 of database. Please suggest me how i can do this.... Thanks & Regards Anjani

        S Offline
        S Offline
        sashidhar
        wrote on last edited by
        #3

        Its a basic sql query .what are you trying to do..! I suggest you to read a good book..!

        LatestArticle :Log4Net Why Do Some People Forget To Mark as Answer .If It Helps.

        1 Reply Last reply
        0
        • A Anjani Poornima

          Hi, I am developing Time Sheet where the user selects the date from asp calender so that seven days will be displayed and the no.of.hours worked will be entered Here my question is how to save the hours worked into the database. In my databse there are columns from day1 to day31. I like to save the hours entered into the corresponding day of database as same the days i entered in the front end. Suppose if i enetered 8hours for day 27 i like to save 8 in day27 of database. Please suggest me how i can do this.... Thanks & Regards Anjani

          N Offline
          N Offline
          Not Active
          wrote on last edited by
          #4

          Your database design is not scalable. How do you differentiate between months, or years? Do you only expect this application to be used for one 31 day month, then never again? You should store the date along with the number of hours.

          CREATE TABLE TimeSheet
          (
          ID INT IDENTITY(1,1) NOT NULL,
          Date DATETIME NOT NULL, --Or just DATE if using SQL Server 2008
          Hours TINYINT NOT NULL
          )


          I know the language. I've read a book. - _Madmatt

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups