Time Sheet
-
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
-
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
So whats the problem, just update table in database Update [tablename] set D27(your column name)=8 where [condition]
-
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
-
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
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