我正在尝试通过文本框中的输入来更新SQL DB表。可以从下面看到的通用VBA Sub中看到我遇到的问题:
Dim conn As ADODB.Connection
Set conn = New ADODB.Connection
Dim rst As ADODB.Recordset
Set rst = New ADODB.Recordset
Dim strSql As String
Dim strADOCon As String
strADOConTechSub = "PROVIDER=SQLOLEDB;Data Source=______;Initial Catalog=______;User ID = _______; Password = ______;Trusted_Connection=Yes"
conn.Open strADOCon
strSql = "SELECT this " & _
"FROM there " & _
"WHERE that <> ''"
Set rst = conn.Execute(strSql)
rst!this.Value = Me.Textbox1
conn.Close
我收到错误消息;
运行时错误“ 3251”:
当前记录集不支持更新。这可能是一个限制 提供商或选定的锁类型。
任何帮助将不胜感激。