addnew
Private Sub Command1_Click()Set conn = New ADODB.Connection
Set rs = New ADODB.Recordset
Dim sql1 As String
conn.ConnectionString = "Driver={sql server};server=Localhost;uid=sa;pwd=;database=vbsql"
conn.ConnectionTimeout = 30
conn.Open
sql1 = "select * from t1"
Set rs = conn.Execute(sql1)
rs.AddNew
rs!Name = "&text1.Text&"
rs!num = "&text2.Text&"
rs.Update
End Sub
我想插入一条记录,但提示:当前记录及不支持更新,可能是选定的锁 的类型的限制,也可能是提供程序的限制