I can write SQL queries in ASP no problem but I have one that I need to run within Enterprise Manager as it will timeout if I call it from an ASP. Can someone help me with the syntax?
Code:
<%
dim strUserName
strUserName = "isisTraffic" then
szStatement = "execute dbo.ap_DeleteDynamicResource '" + strUserName + "'"
set conn = createobject("ADODB.Connection")
conn.provider = "sqloledb"
conn.connectionstring = "data source="& DB &";uid="& UID &";pwd="& PWD &";initial catalog=site_security"
conn.open
conn.execute(szStatement)
conn.close
set conn = nothing
%>
Is this just as simple as typing in the following? I am guessing I may need single or double quotes around the UserName but not quite sure.
execute dbo.ap_DeleteDynamicResource strUserName
Perfect, worked as expected. Thank you very much! Normally increasing the timeout for the ASP would have been easy enough but because of the security layer that the responses go through and the timeout values within that layer in addition to IIS this wasnt a feasible option.