Picture of Visual Studio Project
Hi,
Hope someone can help. I am trying to create a vehicle log for the company I work for. I have managed to get the dataGridView to add a row to the database but, This is what I have found on the internet and it seams to work. Can anyone tell me if this is the correct way of updating the MySQL database from a dataGridView?
NOTE: I added a timer tick so that if anyone added a new line, then the data in the dataGridView it automatically updates the MySQL database.
// saves the data in the dataGridView to the MySQL database
private void Timer1_Tick(object sender, EventArgs e)
{
//int index = vehiclemovementDataGridView.SelectedRows[0].Index;
//vehiclemovementDataGridView.Rows.
vehiclemovementTableAdapter.Update(this.vehiclelogDataSet.vehiclemovement);
//vehiclemovementDataGridView.Update(this.vehiclelogDataSet.vehiclemovement);
}
In have not typed the connection to the database I added a dataGridView and configured it to connect the MySQL database.