doby48
12-20-2011, 03:20 PM
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?
<%
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
<%
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