我总是收到错误3704.关闭对象时不允许操作。
Dim myConnection2, RSTitleList2
Set myConnection2 = CreateObject("ADODB.Connection")
Set RSTitleList2 = CreateObject("ADODB.Recordset")
myConnection2.Open "<%=connectionString%>"
sSQL1 = "Update FileInformation SET Status = 4 Where DataDefinitionID = 147 AND CustomerID = 71"
RSTitleList2.open sSQL1, myConnection2
if RSTitleList2.BOF and RSTitleList2.EOF then
msgbox("INSERT SUCCESSFUL")
frmProcess.cmdPublish.disabled = true
Else
msgbox("Not SUCCESSFUL")
msgbox(err.Number & " | " & err.description & " | " & err.Source)
End IF
msgbox(err.Number & " | " & err.description & " | " & err.Source)
答案 0 :(得分:1)
如果您向我们提供了错误消息附带的行号,那将会有所帮助。但是我可以在你的代码中看到一个相当奇怪的东西
myConnection2.Open "<%=connectionString%>"
为什么“connectionstring”在&lt;%=%&gt;内。如果要在html中显示asp变量,则使用该语法,例如
<h1>Welcome, <%= username %></h1>
当你已经在一段asp代码中时,试试
myConnection2.Open connectionString