vb 对access进行修改
来源:百度知道 编辑:UC知道 时间:2024/05/22 14:32:29
Private Sub Command2_Click()
Set Conn = New ADODB.Connection
ConnectionString = "provider=Microsoft.Jet.oledb.4.0;" & "data source=db1.mdb;"
Conn.Open ConnectionString
Conn.Execute "update biao set text3 = chang where 编号=" & Text1.Text
End Sub
为什么报错说至少有一个参数没有被指定
PS:编号为我数据库中的自动编号
Set Conn = New ADODB.Connection
ConnectionString = "provider=Microsoft.Jet.oledb.4.0;" & "data source=db1.mdb;"
Conn.Open ConnectionString
Conn.Execute "update biao set text3 = chang where 编号=" & Text1.Text
End Sub
为什么报错说至少有一个参数没有被指定
PS:编号为我数据库中的自动编号
把这个放在能用中
public conn as adodb.connection
publid rs as adodb.recordset
--------------------------
Private Sub Command2_Click()
Set Conn = New ADODB.Connection
Conn.Open "provider=Microsoft.Jet.oledb.4.0;" & "data source=db1.mdb;" & ";Persist Security Info=True"
Conn.Execute "update biao set text3.text = chang where 编号='" & Text1.Text & "'
End Sub