I don't know if this is the cause, but check your code ....
Code:ObjCommand.CommandText = "UPDATE table1 SET teamcolor = '" & viewrecordsfrombackup.DataGridView1.SelectedRows(i).Cells("teamcolor").Value & "' where ID like '" & viewrecordsfrombackup.DataGridView1.SelectedRows(i).Cells("ID").Value & " '" ObjConnection.Open() ObjCommand.ExecuteNonQuery() ObjConnection.Close() '<------- here you close Next '<----- here you have Next, but you closed the connection





Reply With Quote
