找了几千年了,都找不到方法
来这里试试
对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 & "' ")操作也是不行么,
哎,,只有指望这里了,这里可是全国顶级论坛额
来这里试试
对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 & "' ")操作也是不行么,
哎,,只有指望这里了,这里可是全国顶级论坛额
中的text3.text是表中的一项吗?这样写不对吧?
更新sql我是如下写的:
sql = "update tblUser set userpassword = '" & newPwd & "' where username = '" & sname & "'"
记住:文本类型一定要加单引号的.
还有:单词间空格不要忘记.
conn.Execute "update biao set chang = " & Val(Text3.Text) & " where 编号 = '"& Text1.Text & "'"
conn.Execute "update biao set chang = " & Text3.Text & " where 񅧏 = " & Text1.Text & ""