找了几千年了,都找不到方法
来这里试试
对ACCESS进行修改
Set conn = New ADODB.Connection
'rs.Open SQL, db, conn, adOpenStatic, adLockOptimistic
'ConnectionString = "provider=Microsoft.Jet.oledb.4.0;" & "data source=db1.mdb;" 
ConnectionString = "provider=Microsoft.Jet.oledb.4.0;" & "data source=db1.mdb;" & ";Persist Security Info=True"conn.Open "provider=Microsoft.Jet.oledb.4.0;" & "data source=db1.mdb;" & ";Persist Security Info=True"'Conn.Open ConnectionString
'conn.Open "select * from  biao", db, adOpenStatic, adLockOptimistic '打开记录集
'conn.Execute "update biao set text3.text = chang where wengjianming = '" & Text2.Text & "' "
conn.Execute "update biao set text3.text = chang where 编号 = ""& Text1.Text"""
' conn.Execute "update biao set text3.text = chang Where 编号 = " & Text1.Text老是说至少有一个参数没有被指定编号为我数据库的编号,很多人不能对他进行操作,可是我里面就他是唯一的,所以我根据这个自动编号来读取要修改的数据了
读取没问题,就是这里修改,,哎,问了N人了,.不行.还有,我数据库里chang是数字类型的,不是文本的,
是哪里不对了啊
就算不能对自动编号进行操作么,我改为对文件名(where wengjianming = '" & Text2.Text & "' ")操作也是不行么,
哎,,只有指望这里了,这里可是全国顶级论坛额

解决方案 »

  1.   

    你的conn.Execute "update biao set text3.text = chang where 编号 = ""& Text1.Text""" 
    中的text3.text是表中的一项吗?这样写不对吧?
    更新sql我是如下写的:
    sql = "update tblUser set userpassword = '" & newPwd & "' where username = '" & sname & "'"
      

  2.   

    conn.Execute "update biao set chang = "& text3.text &" where 编号 = ""& Text1.Text"" 
      

  3.   

    楼上正解 还有这里 where 编号 = "& Text1.Text" 数字 类型 2边上不能 +'文本类型 就必须加上了 
      

  4.   

    conn.Execute "update biao set chang = '" & Text3.Text & "' where 编号 = '"& Text1.Text & "'" 
    记住:文本类型一定要加单引号的.
    还有:单词间空格不要忘记.
      

  5.   

    "还有,我数据库里chang是数字类型的,不是文本的, "
      

  6.   

    这样就行了
    conn.Execute "update biao set chang = " & Val(Text3.Text) & " where 编号 = '"& Text1.Text & "'" 
      

  7.   

    conn.Execute "update biao set chang = "& text3.text &" where 编号 = ""& Text1.Text"" 
      

  8.   

    kao ,靠,,我终于研究出来了全部不用单引号就行了.....
    conn.Execute "update biao set chang = " & Text3.Text & " where ±àºÅ = " & Text1.Text & ""