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

USE DataGridView and bind the grid with a datasource . first create a new datasource with the table you want to populate in the grid and then populate the grid with that datasource.....The datagridview has an option to make the datagrid editable.

No Code required just a good idea of all the features of Visual Studio.

Cheers

This article has been dead for over six months. Start a new discussion instead.