string sql="update table set a_col='abcd' where b_col=@b_col"

using (OleDbCommand Comm = new OleDbCommand(sql, conn))
            {
                Comm.Parameters.Add(new OleDbParameter("@b_col", OleDbType.VarChar)).Value = "123";     
                Comm.ExecuteNonQuery();
            }

-------------这样连接access的时候是没有问题的,当连接mssql的时候就需要把sql改成下面的样子

string sql="update table set a_col='abcd' where b_col=?"

否则会提示 “必须声明标量变量@b_col”