Hello-
I have the following code: I get an error on the insert string that states Operation is not allowed in this context? Any ideas? Could it be the @@identity or the nextrecordset call?
Code:
elseif Request.Form("new") <> "" then
set rcs = GetFromDatabase("insert tblSR(srPublication, srClassification, srCaption, srText, srAgentID, srOfficeId, srDateTime, srMLS, srListingID) values('" & srPublication & "','" & srClassification & "','" & srCaption & "','" & srText & "','" & srAgentID & "','" & srOfficeID & "','" & srDateTime & "','" & srMLS & "','" & srListingID & "')SELECT @@IDENTITY").nextrecordset
newsrID = rcs(0)
if Date1 <> "" then
GetFromDatabase "insert tblSRPub(srID, PubDate, PubAgent, PubPhone, MLS, ListID, OHTime) values('" & newsrID & "','" & Date1 & "','" & AgentName1 & "','" & AgentPhone1 & "','" & srMLS & "','" & srListingID & "','" & OHTime1 & "')"
end if
if Date2 <> "" then
GetFromDatabase "insert tblSRPub(srID, PubDate, PubAgent, PubPhone, MLS, ListID, OHTime) values('" & newsrID & "','" & Date2 & "','" & AgentName2 & "','" & AgentPhone2 & "','" & srMLS & "','" & srListingID & "','" & OHTime2 & "')"
end if
if Date3 <> "" then
GetFromDatabase "insert tblSRPub(srID, PubDate, PubAgent, PubPhone, MLS, ListID, OHTime) values('" & newsrID & "','" & Date3 & "','" & AgentName3 & "','" & AgentPhone3 & "','" & srMLS & "','" & srListingID & "','" & OHTime3 & "')"
end if
response.write "<script>window.close();</script>"
response.end
end if