strSQL = "select test1.no,name,style from test1,test2 where test1.no=test2.no and test2.no=" & 1
Adodc1.RecordSource = strSQL
Adodc1.Recordset.Fields("name").Value = "aa"
Adodc1.Recordset.Update
Adodc1.Refresh
上面运行时没出现问题,可改成下面后就有问题了.提示:缺少更新或刷新的键列信息!WHY?
strSQL = "select test1.no,name,style from test1,test2 where test1.no=test2.no and test2.no=" & 1
Adodc1.RecordSource = strSQL
Adodc1.Recordset.Fields("style").Value = "AAAA"
Adodc1.Recordset.Update
Adodc1.Refresh
请高手指点!
急!!!

解决方案 »

  1.   

    代码应该没问题,检查下你的数据库吧。是不是style字段设置有问题。
      

  2.   

    已经看过了.设置为Text,应该没问题.
    各种属性跟name完全一样.
      

  3.   

    条件固定的话 
    目前的操作方式可以简化一下:
    dim cnn as new adodb.connectionstrSQL = "Upate test1 set style='"AAAA"' from test1,test2 where test1.no=test2.no and test2.no=" & 1 cnn.execute strsql
      

  4.   

    Sorry!
    没试成功.能把代码写全点么?
    Thank you!