MS Access update record
I'm trying to update the records in an Access database where the column "Group" matches the argument.

The method I'm using at the moment is the following:

    public void RenameGroup(string oldName, string newName)
    {
        OpenConnection();
        command.Connection = con;
        command.CommandText = "Update [Data] SET [Group] = ? WHERE [Group] = ?";
        command.Parameters.Add("@oldName", OleDbType.Char).Value = oldName;
        command.Parameters.Add("@newName", OleDbType.Char).Value = newName;
        command.ExecuteNonQuery();
        CloseConnection();
    }

The issue in this case I'm assuming it's that I'm trying to update the same column I'm iterating over and I need to use a Select query first, just not sure what would be the right way of doing it.

Thanks in advance.
MS Access update record
===

I'm trying to update the records in an Access database where the column "Group" matches the argument.

The method I'm using at the moment is the following:

    public void RenameGroup(string oldName, string newName)
    {
        OpenConnection();
        command.Connection = con;
        command.CommandText = "Update [Data] SET [Group] = ? WHERE [Group] = ?";
        command.Parameters.Add("@oldName", OleDbType.Char).Value = oldName;
        command.Parameters.Add("@newName", OleDbType.Char).Value = newName;
        command.ExecuteNonQuery();
        CloseConnection();
    }

The issue in this case I'm assuming it's that I'm trying to update the same column I'm iterating over and I need to use a Select query first, just not sure what would be the right way of doing it.

Thanks in advance.