Hello All,
I have a question regarding reading a data grid, then writing to sql server from the data read. The data grid is populated with employee data that consists of a persons name, any job(s) that person worked on for the week, total hours worked on each job for the week, and the total hours worked by the person on each job for the week. The data in the grid populates onLoad from an xls file and is in the following format:
Column2 = Employee Names & Total Label i.e. John Smith or Total For John Smith
Column3 = Jobs a person worked on i.e. Database Development
columns 4,6,8,10,12,14 are headed by taking the month abbreviation, day of monday - friday, and 2 digit year i.e. for this week the headings would be
Jan 19, 08
Jan 20, 08
Jan 21, 08
Jan 22, 08
Jan 23, 08
they each contain a decimal value pertaining to the number of hours a person worked on a given job. 8.0, 6.5 etc...
what i need to do is read and loop through the data grid get a persons name, the job(s) they worked for that week and the hours they worked on said job and put it into a SQL database table called TimeSheet with the following columns:
EmpName
JobName
Weekending - this column must get the value of Sundays date of the current week.
Monday
Tuesday
Wednesday
Thursday
Friday
I do not have much vb.net expierence but i assume you can read the data grid and to some kind of EOF loop taking those values and inserting them into the database. Any help is greatly appreciated since im shooting completely in the dark here. Also a brief explanation on the code would be of great help since i would like to know why and how it works as well.
thanks,
John
I have a question regarding reading a data grid, then writing to sql server from the data read. The data grid is populated with employee data that consists of a persons name, any job(s) that person worked on for the week, total hours worked on each job for the week, and the total hours worked by the person on each job for the week. The data in the grid populates onLoad from an xls file and is in the following format:
Column2 = Employee Names & Total Label i.e. John Smith or Total For John Smith
Column3 = Jobs a person worked on i.e. Database Development
columns 4,6,8,10,12,14 are headed by taking the month abbreviation, day of monday - friday, and 2 digit year i.e. for this week the headings would be
Jan 19, 08
Jan 20, 08
Jan 21, 08
Jan 22, 08
Jan 23, 08
they each contain a decimal value pertaining to the number of hours a person worked on a given job. 8.0, 6.5 etc...
what i need to do is read and loop through the data grid get a persons name, the job(s) they worked for that week and the hours they worked on said job and put it into a SQL database table called TimeSheet with the following columns:
EmpName
JobName
Weekending - this column must get the value of Sundays date of the current week.
Monday
Tuesday
Wednesday
Thursday
Friday
I do not have much vb.net expierence but i assume you can read the data grid and to some kind of EOF loop taking those values and inserting them into the database. Any help is greatly appreciated since im shooting completely in the dark here. Also a brief explanation on the code would be of great help since i would like to know why and how it works as well.
thanks,
John