修改数据库字段值
原来的代码是通过SQL语言,修改字段内容
sql = "UPDATE TableName Set feild1 = xxx where feild = a";
myDBCommand = new OleDbCommand(sql,myDBConnection);
myDBReader = myDBCommand.ExecuteReader();
我希望改为用Select语句 先找到那行纪录
然后再对其字段修改内容
就象下面代码这样的意思
sql = "SELeCT * form TableName where feild = a";
myDBCommand = new OleDbCommand(sql,myDBConnection);
myDBReader = myDBCommand.ExecuteReader();
myDBReader["feild1"] = xxx
当然这段代码,是错的,是只读属性。
请问应该怎么写。