santrogupta
Posts: 9
|
| Posted: 11/18/2007, 12:40 AM |
|
I have structured my Attendance table as follows to avoid multiple rows entry in DB for one batch, It will just insert one row with all student ID those are present in batch like 2, 1, 16 separated by comma. and this I am achiving by using checkboxlist which allows to select multiple student and Before insert EVENT I am recieving the values(Student IDs) by using Request.Form("StudentID") which gives values separated by comma.
Insert part is ok, but If i want to Update I get the Value of Student ID separated by comma and I want to display Those values in Checkbox list with other student ID also those who were ABSENT with not checked and Those were PRESENT with Checked
and then I can use the same Request.Form("StudentID") to get all the checked values of Student ID and update in DB.
Please Give any good idea
AtndID AtndDate StudentID BatchID TimeIn TimeOut TrainnerID EnteredOn EnteredBy UpdatedOn UpdatedBy
2 11/8/2007 2, 1, 16 1 9:30:00 AM 11:30:00 AM 2 11/11/2007 1 11/11/2007 1
Before insert EVENT
Function StudentAtndTbl_BeforeInsert(Sender) 'StudentAtndTbl_BeforeInsert @2-4E9419E7
'Custom Code @30-73254650
' -------------------------
' Write your own code here.
StudentAtndTbl.StudentID.value=Request.Form("StudentID")
' -------------------------
'End Custom Code
End Function 'Close StudentAtndTbl_BeforeInsert @2-54C34B28
_________________
Santosh Gupta
IT Consultant
santrogupta@gmail.com
+971-50-3531682
|