The Error Notice:
ADODB.Recordset error '800a0e78'
Operation is not allowed when the object is closed.
The Mission :
In every new entry if the new product has Create Tracking Link , option selected then
run a XMLHTTP to get an tracking html address and store that to DB-
My Code - After the new entry complited-
<%
Sub AfterAdd()
set rstmp = Server.CreateObject("ADODB.Recordset")
set Rs = Server.CreateObject("ADODB.RecordSet")
rstmp.Open "select * from Concept where ID = (select max(id) from Concept)", dbConnection
if rstmp("Option") = "Create Tracking Link" then
Response.Write ("<strong>*-*-*-*-*-*-*-*--*-*</strong><br>")
dim objXMLHTTP
dim URL strText
URL = "http://hyperlink_to_get_the_informantion"
Set objXMLHTTP = Server.CreateObject("Microsoft.XMLHTTP")
objXMLHTTP.Open "GET", URL, false
objXMLHTTP.Send
strText = objXMLHTTP.responseText
strText = Replace(strText, "00~", "")
strText = ("http://" + strText)
sql = "UPDATE [Concept] SET [Track_Link] = '[strText]' where [ID] = (select max(id) from [Concept]"
Set Rs = Conn.Execute(sql)
else
sql = "UPDATE [Concept] SET [Track_Link] = "NA" where [ID] = (select max(id) from [Concept]"
Set rstmp = Conn.Execute(sql)
end if
rstmp.Close
Set rstmp = Nothing
Rs.Close
Set Rs = Nothing
Set objXMLHTTP = Nothing
End Sub
%>