请问怎么覆盖数据库中指定字段的某一数据!!谢谢各位!

解决方案 »

  1.   

    用数据库的update方法啊sql语句:
    update 表名 set 你要改的字段名='" & 新值 &"' where 选择条件  
      

  2.   

    请问这句语句的完整写法是怎样的?
    strSQL ="update 表名 set 要改的字段名=" & "Text5.Text" & " where 条件=" & "Text4.Text" & ""
    这样对吗?
      

  3.   

    strsql=" update 表名 set 字段名='"& 字符型变量 &"' where 字段名='"& 字符型变量 &"'"
    strsql=" update 表名 set 字段名="& 数值型变量 &" where 字段名="& 数值型变量 &""
      

  4.   

            Sql = "select  * from 表 where 字段='" 值 "'"
            Rs.Open Sql, Conn, 1, 3
            If Not (Rs.EOF Or Rs.BOF) Then
                Rs("A_Star") = Text1
                Rs("A_End") = Text2
                Rs.Update
            End if
      

  5.   

    漏了 最后加上 
    Rs.Close
    记得,用完数据就关闭
      

  6.   

    把你的条件进一步限定
    strSQL ="update 表名 set 要改的字段名='" & Text5.Text & "' where 条件='" & Text4.Text & "' and 条件='"& Text6.Text & "' "
      

  7.   

        '设置update语句
        sqlstmt = "update businessman set businessmanid='" + Trim(businessmanid) + "',businessmanname='" + Trim(businessmanname) + "',country='" + Trim(country) + "',province='" + Trim(province) + "',city='" + Trim(city) + "',address='" + Trim(address) _
                  + "', linkman='" + Trim(linkman) + "',telephone='" + Trim(telephone) + "',fax='" + Trim(fax) + "' where businessmanid='" + Trim(oribusinessmanid) + "'"