Reputation: 55
I'm always getting error 3704. Operation is not allowed when object is closed.
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)
Upvotes: 0
Views: 2924
Reputation: 4638
It would help if you gave us the line where the line number which comes with the error message. However I can see one rather strange thing in your code
myConnection2.Open "<%=connectionString%>"
Why is "connectionstring" inside <%= %>. That syntax is used when you want display an asp variable within your html, eg
<h1>Welcome, <%= username %></h1>
When you're already in a block of asp code, just try
myConnection2.Open connectionString
Upvotes: 1