PLZ HELP ME OUT ON THIS...ITS VERY URGENT.....
Hi...plz help me out on this...i have stuck up here for past many days...
1) Plz tell me how to update the Database Table from the datagrid...
here is my code : ITS A ATTENDANCE FORM CODE...
I AM RETRIVING MY ATTENDANCE TABLE DATABASE IN THE DATAGRID...
Dim dbconnection As New OleDbConnection
Dim connectionstring As String = "Provider = databasename
Dim dbadapter As OleDbDataAdapter
Dim dtstudentattendance As New DataTable
Dim ds As New DataSet
dbadapter = New OleDbDataAdapter("select * from student_attendance",connectionstring)
dbadapter.Fill(dtstudentattendance)
dgstudentattendance.DataSource = dtstudentattendance
after writing this my datagrid is populated HOWEVER I AM UNABLE TO UPDATE IT...I MEAN IF I DO EDIT SOME COLUMNS HEREIN (ie. in this datagrid) like if i check or uncheck the Status columns for marking attendance and then click update the same should be updated in the database ! CAN U PLZ HELP ME OUT...
MOREOVER I DONT WANT THE ENTRIES TO REPLACE THE PREVIOUS ONES....SAY IF I MARK ATTENDANCE OF TODAY(18/SEPT) THE NEXT DAY WHEN I AGAIN POPULATE THE GRID AND MARK ATTENDANCE FOR 19/SEPT THE SAME SHOULD BE UPDATED HOWEVER 18/SEPT ENTRIES SHOULD BE INTACT...SO THAT I CAN FIGURE OUT WHO WAS PRESENT ON WHICH DAY.....Phew./////
PLZ HELP ME OUT GUYS.....AND PLZ TELL ME THE CODE ON THE ABOVE LINES ONLY.....
SECONDLY, ADAPTERNAME.UPDATE(DATASETNAME) IS NOT WORKING FOR THE PIECE OF CODE I HAVE WRITTEN ABOVE...PLZ HELP ME ITS VERY URGENT